Companies and philanthropists in the San Francisco Bay Area, including Facebook Inc. Chief Executive Mark Zuckerberg, said they plan to raise $500 million for affordable housing, weeks after California Gov. Gavin Newsom called on the private sector to do more to address the region’s critical shortage of homes.

The investment fund, which has raised $260 million so far, aims to help build at least 8,000 homes in five Bay Area counties within the next 10 years, according to its leaders. It also will work to preserve homes at...