TOLLESON, Ariz.—Armed with loads of cash and the latest in machine learning, investors are reshaping the $26 trillion market for U.S. residential real estate, starting in Phoenix, the petri dish for America’s housing experiments.

At the edge of the city’s stucco sprawl, a beige, three-bedroom house with a gravel yard sold last month for $240,000. The seller, Opendoor Labs Inc., paid $215,000 for the house in January, replaced carpet and repainted, and put it back on the market.

A...