Other agents have given you great insights into school districts and location: very important factors in determining the value of a home.
Let me give you a different perspective.
As you pointed out, Milpitas has the Great Mall and is conveniently located with many freeways connecting you to different cities within the Bay Area. I have not heard much in terms of major developments that may alter the community in a dramatic fashion.
However, in Santa Clara, you already know about the 49ers Stadium coming online next year, which will alter the city. But there was a recent announcement that developer Related may be given exclusive options to build a 230 acre mixed use shopping/residential community like Santana Row, except it will be about 10x larger. With Sports/Concert and Mega Shopping complexes within walking distance to each other, there will be a lot of activity and demand as the surrounding neighborhood look more attractive to buyers. Just look at the value increase that happened around Santana Row.
So not only should you look at schools and commute between those two cities, but you should also consider what the demand will look like for homes in those same cities 5-10 years down the line.