It seems more likely that costs are higher in cities because there are valuable opportunities for skilled people who demand high salaries, simultaneously encouraging dense living to maximize access and increasing cost of living through the Baumol effect. High prices causing density, not the other way around.