Well, mushroom spores are very very small and can easily be airborne, so it's entirely possible a few could have been in your bedding or moss. And yes, mushrooms as a rule like warm, dark and damp, pretty much like a ball python does.
The maggot could have come from anywhere. Pretty much any species of fly, no matter how small, has maggots as a larval form, so it's completely conceivable it could have just been a stray fly larva. And since most mushrooms have a slightly earthy smell, it's natural a fly would be attracted to it to lay it's egg.
Or I could be way over analyzing it and the egg was already in the bedding or moss.
Any time I find mold, and it happens to the best of us, I discard everything in the tub, clean the tub well and put in new bedding.
Chances are the mushroom was harmless unless ingested, so I think Madison will be fine. You can also phone the vet for an opinion if that makes you feel better.
I have kept animals long enough to know, sometimes no matter how careful you are, weird stuff happens.
Gale