Not exactly the same but I went to Deusto in Bilbao for a year and I can tell you there definitely are those 'rich cliques' and I'm sure there's the same in Madrid but they do not represent the average student and I'm sure MANY of them would love to teach you more about Madrid/show you around.
Choose the city you think you'll be happiest living in, everything else (including how friendly local students are) is secondary. Most of my best memories where from exploring the cities/adjacent areas, even though I did make local friends too! I would choose Madrid purely for the culture/food/slightly better weather, it seriously impacts how happy you are. My attendance in the UK at uni was NOT good at all but in Spain it was almost 100%, purely due to the environment.