Temperature, humidity, lighting would all be under controlled conditions. It would not matter if there were new extreme temperature swings outside or if there was drought. The needed food and water would be immune to any projected climate change over the next 500-1000 years.
Alibaba sells greenhouses for as little as 70 cents per square meter. The bulk, high volume cost to the manufacturer is about 50 cents per square meter. If installation labor costs are 50% of the 2 million hectare project then it would cost about $20 billion for the 2 million hectare project. $40 billion would be sufficient for China to make 40 billion square meters of climate-controlled greenhouses which could produce all vegetables and crops. It would cost $260 billion to make greenhouses for the food production of the entire world.
Indoor climate-controlled agriculture has almost no need for pesticides and uses 7% of the water. This would take up 3-5% of the total land area of open-air farming.
Additional funds could be provided for higher demand from population growth and for some level of automation, sensors and other systems.
There is an economic analysis of smaller scale greenhouse and vertical farming. The all-in delivered cost of a pound of greens grown in a commercial greenhouse is estimated to be $2.33 per pound. It cost $18.3 million to build 280,000 square feet (2.6 hectares) of commercial greenhouse in the USA. The total cost to grow would be just over $3.0 million per year for 2 million pounds of greens or $1.52 per pound. BrightFarms employs 165 people for the three greenhouses. $1.10 per pound consists of employee costs.