Here's the thing, most of the things designed to kill planaria won't kill rhabdacoela, nematodes, or detritus worms and all you'll wind up doing is putting your other tank inhabitants at risk (snail, shrimp, etc). Also if they ARE planaria, doing anything to them will cause them to multiply. As in, you get a planaria, cut it in half, you have two planaria. You have a planaria, go to siphon it out and accidentally smoosh it with the side of the siphon you might have 30 planaria.
There is a sticky at the top of the shrimp forum on shrimp keeping and in there is a guide to fauna in the tank. If you have plants and shrimp only tank, fauna is just likely to happen because fish generally take care of them. Unfortunately most fish make snacks out of shrimp too.
So you either learn to deal with it, learn what they are (and if they are not planaria, yes you can try to siphon them out with your water changes), or just don't have shrimp only tank. I'm not saying that to be a smart alec, that's just sort of how it is. Also, overfeeding and feeding directly on the substrate can also lead to break outs in the fauna population.
I used to hate seeing ANYTHING in my shrimp tanks like that and then realized it was zapping all the fun out of my tanks worrying about them. As long as I'm not seeing planaria or hydra, I don't care about the others. They all serve a purpose, eating detritus, algae, decaying plants matter, leftover food, etc.