You are mistaken. Currently, the higher income you have here, the higher tax rate you have, where the highest tax rate on income sits at 47%, which you get hit by when your income is above 300K/year. People between 60K and 300K sits at 45%.
And then there are regional differences, someone in Andalucía don't pay the same amount of taxes as someone who lives in Catalunya for example, where the top tax rate is 50%.
Even taking into account other taxes we have, you still end up paying more in taxes the more you earn, unless you start engaging in schemes to lessen your tax burden, obviously. Although the social security is capped, so it does increase slower once you go beyond the cap, but it doesn't start regressing which your comment hinted at.
Edit: important to note that the tax rates are all marginal tax rates, maybe that was a bit unclear.
If/once you reach that point (+60K/year), you already live a above-average life, why not share some of that with others who aren't as good/lucky as yourself? Seems like a no-brainer to me, but I might be too European to really grasp the problem.
I wonder, have there been any studies/considerations for making rent tax-deductible for individuals? That would address this problem for example. There probably is a good reason for not doing it, but I wonder what it is.
Barcelona (and Madrid) are extreme examples though, not "average" by most measures. Take a look at houses/apartments just 30 minutes outside of Barcelona (not too familiar with Madrid) and it's way easier to find affordable places, and it's easy enough to get into the city with trains and buses.
Even if you count the greater metropolitan area (where I'm part of the Barcelona one myself, although I live 30 minutes away from the city), you only get up ~20% of the population living in either Madrid or Barcelona. Even then I'd say we're in minority compared to the people who don't live in either those "metropolitan" areas.