NEPONSET, Ill.—Farmers like Terry Pratt are a big reason Midwest farmland prices seem to be defying gravity—for now.

Inside the tidy red-brick community center here, a hushed crowd of town merchants and growers watched as two of their own bid against each other at an auction for 50 acres of corn and soybean land.

With...