That might be true, but one could argue that after an investment, people would more readily sell the stocks they still have at home It's kind of simplistic to think all the food produced goes into the warehouses of a region anyway. Looking at it from a medieval perspective, I think the food in the Lord's warehouse consists of a percentage of the total production in a region, given to him by the peasants in exchange for the protection the Lord provides (I don't know the right terminlogy in english, so excuse me the unorthodox way of putting it )
Do note that investments go into the
region, to increase production and thus a portion of the produce is taken by the regional government. Food is taken as a portion of the produce, not stocks at home. You're right, the portion is taken out of
total production, and you can't increase
total production of a resource by throwing money at it.