Very strange!
I can't say I have seen anything quite like that. I have seen some snakes become very lethargic BEFORE shedding, but not after. Maybe it had some kind of seizure? I can't think of what else would cause it, but I am not a vet.
I have heard of people getting aspirational pneumonia after a near drowning event. I would guess it might be possible for any animal with lungs, though I never heard of it in a snake. If I had come upon the snake, I would have held it upside down for a couple of minutes or more, trying to drain as much water as possible. And maybe do it a couple of more times over the first hour or so. Then I would remove the water as you did, and probably keep the very small bowl for quite a while, in case there is a repeat performance. I would probably offer a hotter than usual hot spot (with a place to escape the heat, of course). And of course, anything you can think of to reduce stress, as well.
If you know a herp vet who will talk to you on the phone during the day, I would ask about the possibility of any aspirational infection, or any other possible complication. A vet can't really diagnose over the phone, so they usually err on the side of caution and say to bring it in. The key question is to ask what they will do, other than just examine the snake. If they just want to examine and don't plan to do anything unless needed, and it seems that they are just being overly cautious, you may not need to go in. But if the vet seems to think that complications are likely enough to warrant preventative antibiotics, or some other treatment as a precaution, then maybe it is worth going for the treatment.
Even though I have not had great results myself in using herp vets, I would never discourage anyone from going in if it helps your peace of mind. Only you can make that decision after talking with a qualified herp vet on the phone.
I am sorry I can't give you better advice, based on experience. But I have not had to go through that particular experience - so far.
Please update us as I am always interested in hearing about various problems and their resolution.
Good luck!