Housing is the root of quality of live.
Not only housing afford ability is important but also quality of housing. Social housings in Vienna come sometimes with pools on the flat roof or saunas. They built Gemeindebauten [1] (social housings) in posh areas. They made exceptional architecture for the people. (for example Hundertwasserhaus) [2]
[1] https://en.wikipedia.org/wiki/Gemeindebau [2] https://en.wikipedia.org/wiki/Hundertwasserhaus
Housing affordability is only one part of the equation.
Also - what makes a place a 'great place to live' is highly subjective. It depends on what you want to measure.