Earthworms in the class oligochaeta, which is in the phylum annelida. Ecdysis occurs in the phylum arthropoda. My guess is that earthworms' cuticles undergo a process closer to our skin's than ecdysis.
It eats the soil, and pushes it through and out the other side. They are very helpful and break down the soil. They also add extra nutrients to the soil when it filters through them.