This isn't really a matter of biology so much as etymology.
The English word for "worm" was applied to any sort of slithering distasteful creature for centuries before we actually started get our taxonomies properly sorted out. Thus, the word "worm" ended up in the common names for lots of organisms without any real relationship to one ...
An addition to tsttst answer:
"Worm" can go to very abstract realms, in Neuroethology "Worm" can be a stimulus attribute:
horizontal movement implied:
▄▄▄▄▄▄ would be considered "Worm configuration"
would be considered "antiworm" (ignore the white stripes)
at this level of abstraction underlying taxa would ...
In common English, worm is not a precise biological term, and long predates even the idea of precise biological names. It's a generic descriptor for creatures that are long & skinny, without much in the way of legs. So we have earthworms, silkworms, tapeworms, &c. Even dragons can be called worms - or wurms, wyrms, &c, depending on your ...
Excellent question. My zoology professor during biology undergrads explained this by clarifying that "worm" is a term that relates to one type of shape of animals. As such it does not carry any additional information on the relatedness of animals or their developmental stage.
This view also seems to align with wikipedia.