You can't get it to go where you want/need it to, not at depth.
Let's review; you need a slime mold that eats rocks, an idea that isn't without scientific merit, many fungi eat into their substrate for nutrients as do many sponges with the difference being that the sponges live on boulders not logs. The problem you have is how do you entice a rock eating slime mold to go the way you need it to?
With slime mold networks scientists use closely spaced food concentrations (which, because they're in the open air, shed detectable particles into the environment) as proxies for population centres and use the mold's feeding tendrils as a map for laying out hard links between those centres in the real world. Now compare your scenario; we have a mold that eats rocks, it only wants rocks and is tuned to find the ones it finds "tasty" under current nutrient loads. Given the heterogeneous and unpredictable nature of rock formations there's nothing to act as a food concentration that will get it to move in the underground direction you want it to go instead of heading over there where that surface clay deposit is just what it needs today. The second problem is the distances involved; even if we posit an engineered organism that moves toward something other than food. This organism has to be able to sense the concentrations of this non-food stimulus, through solid rock, over kilometres, with only the, extremely basic, chemical receptors on it's surface. If it has more than that it isn't a slime mold anymore.
If you want to keep the molds and the tunnels they leave behind have them eat particular ore veins or similar. There you actually have a justifiable precedent, the mold is chasing food concentrations. The tunnels they carve out in pursuit of the ore can continue to expand slowly after the primary vein is gone as a thin skin of the mold continues to eat what it happens to be sitting on leaving behind round(ish) tubes. Those can be washed out with fungicides, to avoid eventual destabilisation by continued slime mold action, and used by the human population. The mold may even leave behind useful material in the form of reduced metals or purified minerals that are its wastes but a boon for the humans exploiting them.