Venture capitalists think they have an answer to the growing housing crunch in San Francisco and other big cities across the U.S.: adult dorms.

Shared office space giant WeWork Cos., recently valued at $16 billion, and a handful of smaller startups are experimenting with “coliving,” a concept that involves tiny apartments, shared kitchens and lounges, and a communal atmosphere.

Unlike...