Both "to" and "over" have many meanings, and this is not really the central meaning for either of them. Yes, in this construction, the meaning of the two sentences is exactly the same, the difference is purely one of style. Both are comparing two things. Both sentences are quite correct and fully natural. I think this use of "over" is more common in UK English than in US English, but I hear both in the US.
Comparatively basic words like "to" and "over" tend to develop many specialized senses and functions, and these may come to overlap. Remember that English was never designed, it "just grew", and is now rather tangled.