So capitalism is “ok”… sometimes?
If investments in stocks is “just as much capitalist behavior” then what makes investments in real estate somehow worse? Because you could literally be investing in companies that, as an example, seek to privatize access to water or healthcare or other things I would consider basic human rights just as much as housing. At a minimum all companies exploit the labor of their workers in parasitic ways.
“feels a little less negative on the working class” is highly subjective. I can personally see no difference between owning real estate and renting it out vs investing in companies that exploit people in other ways. Many capitalist activities that you could invest in have extremely far-reaching and long-term adverse effects, some very direct, such as use of fossil fuels.
So quite literally it feels like many complain about landlords as a kind of bogey man while the chemical plant down the road is giving their kids brain damage and another is denying them basic health care.