It's so much more than that. Don't forget the stereotypes of the entitled Shanghaier. A significant portion think that geography makes them better than the rest of the Chinese.
It is true but not unique to Shanghai (therefor don't be too upset). Shanghai in its short history has been the most economical and literal dynamical in modern China, in other words rich.
People being rich tend to glorify themselves. We have seen recent examples elsewhere in China where people from rich regions in the south try to re-interpret Chinese history as emerging from places other than the yellow river basin even though most of these revisionist's ancestors are from yellow river basin. Don't you remember one of our banned member from Singapore repeatedly claimed that mainland Chinese is less Chinese than Haka Chinese in SEA? That altitude isn't unique to him but to many people in China as well. It is human nature, 嫌贫爱富,虚荣,傲慢.
Also it is arrogant and stupid to think that Shanghai itself made it rich, whether due to its location or population. It was only because Qing dynasty made Shanghai an opening post. In other words, it was made rich by the central government.