SAN JOSE, Calif.—As Silicon Valley swelled with technology jobs for much of the past half-century, the city of San Jose was happy to serve as its bedroom community, blanketing vineyards and plum orchards with homes until it became the nation’s 10th-largest city.

But all that building has taken a toll, leaving this city of roughly one million people low on land and fiscally stretched. Now, grappling with soaring housing costs thanks to the region’s continued job growth, city officials are criticizing neighboring cities for...