Shower speakers are safe, yes. But only shower speakers or waterproof or water-resistant speakers with an IP rating over 7. You don't want to bring just any speaker into the shower or out to the beach with you.
Waterproof or water-resistant speakers will have a protective element, a conformal coating barring any moisture from penetrating the circuit boards.