Fewer builders are starting new homes amid high prices for materials and loans, threatening housing shortages