But today it has a new problem. For all its forward-thinking companies and liberal social and environmental policies, the state has mostly put higher-value jobs and industries in expensive coastal enclaves, while pushing lower-paid workers and lower-cost housing to inland areas like the Central Valley.

This has made California the most expensive state — with a median home value of $550,000, about double that of the nation — and created a growing supply of three-hour “super commuters.” And while it has some of the highest wages in the country, it also has the highest poverty rate based on its cost of living, an average of 18.1 percent from 2016 to 2018.

That helps explain why the state has lost more than a million residents to other states since 2006, and why the population growth rate for the year that ended July 1 was the lowest since 1900.

“What’s happening in California right now is a warning shot to the rest of the country,” said Jim Newton, a journalist, historian and lecturer on public policy at the University of California, Los Angeles. “It’s a warning about income inequality and suburban sprawl, and how those intersect with quality of life and climate change.”

You can see this in California economic forecasts for 2020, which play down the threat of a global trade war and play up the challenge of continuing to add jobs without affordable places for middle- and lower-income workers to live. You can see it in the Legislature, which has raised the minimum wage, and next year is poised to debate a bill that could reshape the state by essentially forcing cities to allow multistory buildings near transit stops. You also can see it in the stories of people like Ms. Johnson and other highly educated workers who have gone elsewhere.