What Danlisa said! LOL
Seriously, you're in a world of hurt when you get cornered in shallow water like that. In my experience, the options depend in large part on how many DD's you have above you. If there's only one, you may be better off attempting to maneuver for a snap shot and trying to deal with the threat directly, as it were.
If there's more than one, or you're not feeling adventurous, then your only hope is the old sprint-and-drift strategy. Silent running at all times, 1 knot, maybe 2 knots MAX, and keep your ears peeled on the DDs. The minute you hear those props spin up as they start their depth charge run, set your rudder to hard starboard or port and keep your finger poised on the engine telegraph (if you were in deeper water you'd also want to set the depth meter for a new depth) ... wait for it ..... wait for it ..... when you hear the depth charges drop (and you will), ahead flank! Sprint for a bit while the charges are exploding, then all stop. Ideally the turbulence created by the charges will mask the noise you made while sprinting, and then the DDs will have to re-acquire you. And hopefully the charges didn't cause too much damage (you DID assign crew to damage control, right?) Then rinse and repeat.
Be prepared to sweat this process out for quite a while -- the DDs are very persistant!
Good hunting, and good luck.