So basically you have to be one of those companies that put out "cash for your house" ads?
A friend of mine invests directly in tax liens, and develops very good relationships with the people who were underwater. He usually works out an agreement with the homeowner to buy the house (lump sums are very valuable to these people) and rents it out to them for life, at a rate they can afford.
Sometimes, the people take the lump sum and run (and he gets the property). In other circumstances, he has a super loyal renter-for-life.
I might have gotten some subtle parts wrong, it's been a year since he last explained it to me. Obviously it's not for everybody, you really have to be a people person with a lot of empathy. :)
And speculation and investing are the same thing, except the former is often used in a pejorative way.
Or even if you plan on living in it, if you want to make money when it comes time to sell, and not just break even, after accounting for total cost of ownership.
Most people who think they sell their house for a modest profit are wrong.
This is generally true regardless of the location, with the caveat that hot markets are more likely to have more professionals participating that know how to include those costs.
Often people see those higher prices as greedy profit (or as artificially high in order to gentrify, etc.), and developers do need to make a profit, but often times a large part of the elevated price is just including hidden costs that homeowners don't account for.
But looking at it from the other side, developers/investors are only going to enter markets where they believe there's a margin for profit. Which generally means those neighborhoods are a bit underpriced to begin with.