They are harmless , I have a lot of worms from my shrimp tank. If you try to use any chemicals kill worm, then your shrimp will be die
You need reduce feed them, change 10% water per week, and Otto fish like eat those worm