The report was produced by the HSBC bank, dear.
Ummm, yeah, but the article you are linking to from
El País is from
July 2019. That was before everything changed because of COVID.
HSBC puts out an "Expat Explorer" report every year. The 2021 ranking table is here:
https://www.expat.hsbc.com/expat-explorer/league-table/
Spain ranks number 3 in the category of "living," but its
overall rank is 14. And it ranks 15 in the category of "future outlook."
The top ranking countries are Switzerland, New Zealand and Australia.
The lowest rankings belong to Italy, Turkey, and the UK.
And this is a survey that attempts to measure the sentiments of
expats. So they are collecting data from
foreigners. It is not measuring, or comparing, the satisfaction of
citizens who were born and raised in each country.