I would say there's little or no difference, and the two are interchangeable in most contexts.

However, when using an "each other" construction, I think that compare with sounds a little better -- it emphasizes that the comparison is "in both directions." So, in the sentence:

"How does Russian rye bread compare __ American rye bread?"

...you can use either "to" or "with." But in the sentence:

"How do Russian and American rye breads compare __ each other?"

...I would generally prefer "with," although "to" is not incorrect from a grammar standpoint.

P.S. To answer that question, American rye bread is rarely 100% rye, and sometimes may be as much as 50% wheat, so it's softer and much less sour than Russian rye bread. (However, which one is "better" depends on whether you're eating it с клубничным джемом, or с горчицей и ветчиной, IMHO.)