I am better compared with/to you.
"I am better than you" is the best answer. Also, above sentence has different and incorrect meanings embedded. "I am better compared..." can convey that when I am compared, my comparison is better than yours rather than I am better than you. If that inded is the intended meaning then appropriate sentence would be "My comparison is better than yours". In this scenario, I feel that compare should not be used at all and hence there is no issue of 'to' or 'with'.
Broccoli is good for you compared with/to ice cream.
This again is an incorrect sentence. I feel that there are two separate clauses but they are not joined at all. A better sentence is "Broccoli is good for you when compared with/to ice cream." But the meaning of sentence is distorted here. It appears that the meaning is; Broccoli is good for you only when it is compared with ice cream, otherwise it may not be. Also, when broccoli and ice cream are compared, 'better' instead of 'good' should be used. Better sentence would be "For you, broccoli is better than ice cream". Again I feel that compare is not required and unsuitable in this scenario as well.
Gregory Peck was a better actor compared to/with Jimmy Stewart.
Again 'than' instead of 'compared to/with' should be used. Two separate clauses but nothing joining them. Use of than such as " Gregory Peck was a better actor than Jimmy Stewart". is more meaningful, clear and concise. If you write "Gregory Peck was a better actor when compared to/with Jimmy Stewart.", meaning gets distorted. It tries to make a statement that
Gregory Peck was a better actor only when he was compared with Jimmy.
In all of the three sentences, I do not see a way to remove all grammatical errors and still keep the intended meaning. Overall, it appears that compare to/with should only be used when the goal of comparison is to find out or describe similarities or dissimilarities between two or more items. If there is no such intention then a comparative verb forms should be used instead of compare.
Refer to "dictionary.com": Compare usually takes the preposition to when it refers to the activity of describing the resemblances between unlike things: He compared her to a summer day. Scientists sometimes compare the human brain to a computer. It takes with when it refers to the act of examining two like things in order to discern their similarities or differences: The police compared the forged signature with the original.
The key should be what is intended. Sometimes "comparison" or "comparing" is a better suited word than "compared". If the process of comparison is in progress, "comparing" should be used and if process of comparison is complete and decision making is in progress then "comparison" should be used with appropriate preposition.