Sorry to hear about your situation.
I wish everywhere had a system like we have here in Vienna. Yes, there are private landlords. I'm one of them. But the biggest landlord is the City of Vienna itself. Vienna is constantly building high quality public housing. One example nearly 100 years old is the Karl Marx Hof
https://en.wikipedia.org/wiki/Karl-Marx-Hof
Public apartments here aren't super "bougie" (as the kids would say!) but it is nice, well built and well kept. It is only available to people of limited means, so nearly all working class and a huge portion of the middle class live in apartments either partially or fully subsidized by the city. Yes, there are homeless people in Vienna, but no surprise - we don't have a homeless problem.
Back to landlords. Having the city as your competition for a huge portion of the population means that rents stay low. This is extremely similar to how medicare for all works here. Sure you can go to a private doctor, but you can get all basic care from nearly any doctor - paid for by our taxes.
What this means for me as a landlord is that in the long run I can (and have) made money renting out flats. I can't price gouge because there is a huge competitor offering good housing with no profit motive. There are also lots of laws to disincentivize land speculation. So it is a long term, low yield but safe investment.