Capitalism doesn't invest in farms is because capitalism for farming is broken
The cost of land is a big reason why the capitalist is necessary in the first place. In business terms, land is a capital cost: It's a big, up-front cost that has to be paid out of the farm's profits over time, but it only needs to be purchased once.