San Francisco is a land of punishing costs, where the median home sells for $1.6 million, and toast smeared with avocado tops $10.

But 26-year-old Ben Yu calls it “one of the cheapest places in America to live.”

A new type of bargain hunter has found an Eden in the epicenter of the tech boom. The city is full of growth-hungry startups rich...