Equilibrium of the housing market depends on a complex set of interactions between: (1) individual location decisions; (2) individual housing investment; (3) collective decisions on urban growth. We embed these three elements in a model of a dynamic economy with two sources of friction: ill-defined property rights on future land development and uninsurable shocks affecting labor productivity. We characterize the feedback between the households’ desire to invest in housing as a hedge against the risk of rent fluctuations and their support for supply restrictions once they own housing. The model generates an inefficiently low supply of housing in equilibrium. The model also rationalizes the persistence of housing undersupply: the more restricted the initial housing supply, the smaller the city size selected by the voting process. We use the model to study the effects of a number of policies and institutional changes.