NEW DELHI—When Ford Motor Co.Early Misstep built its first factory in India in the mid-1990s, U.S. carmakers believed they were buying into a boom—the next China. The economy had been liberalised in 1991, the government was welcoming investors, and the middle class was expected to fuel a consumption frenzy. Rising disposable income would help foreign carmakers to a market share of as much as 10 percent, forecasters said. It never happened. Last week, Ford took a $2 billion hit to stop making cars in India, following compatriots General Motors Co. and Harley-Davidson Inc. in closing factories in the country. Among foreigners that remain, Japan’s Nissan Motor Co. Ltd and even Germany’s Volkswagen AG—the world’s biggest automaker by sales—each hold less than 1 percent of a car market once forecast to be the third-largest by 2020, after China and the United States, with annual sales of 5 million. Instead, sales have …