One of my favorite cities in Europe is Vienna in Austria, which is one of the cities with the highest quality of life. This is because of many things, one of them is relatively safe and affordable housing: either subsidized or directly managed by the city - something rather rare but has about 100 year tradition. Here is a simple pie chart of the housing “distribution” as of Jan 2020:
More details here. Some may find this article interesting, too.