To get rid of them: move whatever they were hiding under, and let the chickens eat the worms.
I don't know exactly what they are, but I'm sure it's safe for chickens to eat them. Those worms eat spilled chicken feed, decaying bedding, and things like that; and they like to hide in sheltered spots where birds cannot eat them. They aren't earthworms, but might be some kind of maggot or pillbug.
If you move the dish every day, your chickens can have a nice treat, and you will eventually find less of those worms. Even moving the dish back and forth between two locations will work, because the chickens can pick the worms from one spot each day.