Setting aside whether it would be stylistically better to express the thought in some fifth way, and approaching this as a multiple-choice question, one can immediately rule out (2) and (3) as ungrammatical, because of the mismatch between the subject and the verb. This leaves (1) and (4), which are both grammatical. Each of the two is also defensible as making sense, but they, arguably reflect subtly different ways of conceptualising size(s).
One may think of size as something abstract that exists independently of the individual material things that instantiate it. One will then think of X and Y as instantiating that same one size, which makes (1) the best formulation.
Alternatively, one may think of sizes as something that exists only as sizes of particular things. According to this line of thinking, there is in this case only the size-of-X and the size-of-Y, which are the same; there isn't one abstract size that they both share. That favours (4).
Incidentally, the similar questions could be asked,a nd similar answers given, about various qualities other than sizes.