That is not too far from what we do now to make our crops grow, since soil depletes quickly as you grow crops. "Crops perform better when they have nutrient-rich soil. Healthy soils contain a balance of nitrogen (N), phosphorus (P) and potassium (K). These three nutrients help plants grow in different, yet each important, ways:
Nitrogen helps a plant’s leaves grow;
Phosphorus supports a plant’s root growth and flower and fruit development; and
Potassium is a nutrient that improves the plant’s overall health."
Google Potash mines images and you will get some great ideas for what an underground "soil" mine would look like. Potash is made of potassium.
Then you'd need Nitrogen--"Nitrogen fertilizers are made from ammonia (NH3), which is sometimes injected into the soil directly. The ammonia is produced by the Haber-Bosch process. In this energy-intensive process, natural gas (CH4) usually supplies the hydrogen, and the nitrogen (N2) is derived from the air." So rather than mining Nitrogen you would be manufacturing it. No doubt human waste could help in the processing...
Lastly you need phosphorus- "Most of the phosphorus used in fertilizer comes from phosphate rock, a finite resource formed over millions of years in the earth's crust. Ninety percent of the world's mined phosphate rock is used in agriculture and food production, mostly as fertilizer, less as animal feed and food additives."
Google phosphate mining and it appears that form of mining is usually strip mining on the surface. But... creative license..
So over all you need not come up with too fantastical of an idea which the world would have to mine soil. Since we already do. Any of your ideas, Global freeze, Global flood. Global disaster...