As mentioned in the article, it is most attractive to rent out your apartment temporary from 1 to 11 months. Longer renting contracts are quite risky from a landlord's perspective. E.g. in Spain if your tenant goes bankrupt and does not pay the rent anymore, you cannot kick them out until they have found something else. Good luck on that. The law sounds nice because no one wants people to end up on the street, but it effectively makes small landlords exit the rental market. Protection from squatters is also nonexistent. Local newspapers are full of stories of places being occupied by squatters while empty for renovations.
Also there are these stupid local regulations around having to create social housing in every building / renovation project. That also significantly reduces new supply.
You seem to be confused, and a tad ignorant too. Public housing investments are nothing new, and Barcelona has already benefitred from a massive urban development program at the turn of the century.
https://en.wikipedia.org/wiki/Eixample
Barcelona has already one if the highest population densities in the world. The examples you listed in Austria are already eclipsed by the massive appartment blocks in Barcelona and neighboring municipalities. Your average city block in Barcelona is already 6 stories high or greater. It's a dense urban area covered by massive residential blocks.
Even if you start demolishing blocks to replace them with hongkong-style skyscrapers, you would need a few decades to increase supply in a meaningful way, and even then the impact would be negligible.
Barcelona's problem is not supply.