Not sure what "pinned" by a boat means. The squidders do get way too close, but they are not moving around, at least when I have seen them. Unless you swim directly beneath a boat, which I don't recommend, there is not much danger other than the surprise to the old ticker. If you are with a newbie, or someone that freaks easily, I would make sure you discuss it beforehand. An M80 going off at 90 fsw in the dark is creepy. Then you get relaxed, and 10 minutes later POP goes another. Rather disconcerting.
If they have been active, I have found seal bomb remnants on the sea floor. They are basically waterproof M80s. They are orange, and actually say "seal bomb" on them. They are legal, unfortunately. I don't think squid have the intellectual capacity to be afraid of a pop.
And as we all know sound travels faster in water than in air (and even faster through solid), and is omni directional underwater. So it could be a mile away behind you, but it sounds like it's over your head (and you can feel the concussion as well)
Yes, there are areas of the world, including the Phillipines, Thailand and Malaysia where dynamite fishing is common
Happy diving
Chris