You sort of can, but it requires increasing density (so per square foot stays similar but those with low incomes can still afford a small place) or older neighborhoods becoming more expensive than newer neighborhoods (happens all the time).
Increasing density likely implies displacing the people presently in the expensive neighborhood for construction. In the U.S. anyway, that’s easier said than done. So that’s definitely a theoretical solution but I’m not sure how practical it is.