The Hecksher-Ohlin model explains mathematically how a country should operate and trade in a world where resources are imbalanced. It suggests that countries export what they can produce most efficiently and plentifully. For example, one country may have extensive oil reserves while another has an excess of iron ore. Under the Hecksher-Ohlin model, each of these two countries will export the product that they have in excess.
Your question states that India and the United States have vastly different relative factor abundances, yet export many of the same agricultural commodities. At first glance, this may seem like a contradiction of the Hecksher-Ohlin model. However, I don't think that's the case.
Consider that factor abundance is the resource richness of nations. It's typically thought of as a two-factor model, which involves both capital and labor. Under this model, the relative aspect of factor abundance is an important consideration. Essentially, you want to look at both the labor and capital that a country has. Then, compare that to other countries. Even if a country has more capital and labor than another country, the quantity of capital advantage could be greater than the quantity of labor advantage in the other country. In this scenario, the first country is capital-rich while the second is labor-rich.
This could serve as one explanation for why the United States and India export many of the same agricultural products. The US uses its capital-rich status to produce agricultural products at a rate that allows for export. India uses its labor-rich status to produce similar products for export. Therefore, each country is acting as you would expect them to under the Hecksher-Ohlin model, even though the scenario may seem, at first, like an exception to the model.