Water leakage through shower wall
Because, as you suggested, the leak is likely caused by the gap between the shower and wall (and not a leak in the water supply pipe) it's a practical impossibility that mold in the wall somehow found its way into the supply pipe.  So, "No", mold didn't contaminate the water coming from the supply line.