In reality the average Spaniard isn't experience the majority of that, as those are perceptions that arose from the rose-tinted glasses of tourists. Most tourists don't know about the Eurozone crisis, the regional disparity, and the consolidation of Spain's economic growth engines to 1-2 cities.
Spain is a good developed country with a decent QoL as is reflected by it's HDI and developmental indicators (and the fact that it has outpaced historically richer and more developed Italy is a testament to that), but tourists almost always take a rose-tinted view whereas locals almost always take a negative view.
And I think this is the crux of the issue with how the "World Happiness Index" is used in American discourse - in the US almost no one vists Europe or other parts of the World for extended periods of time and most Americans lack familial or social ties in Europe. As such, idealized images of Europe ("a socialist paradise" or "white Christendom under siege") have taken hold in popular discourse and are used as proxies for the American culture war.