The word in the Greek is "skolex" -- a grub, a maggot, or an earthworm.
The word in Isaiah 66 is something different, though (aside from it being in a different language!) -- it is "towla-ath", and has the association with crimson, or scarlet. "A scarlet grub"!
So there may also be an association with Isaiah 1:18, where the Lord lists the colors of sin as both scarlet and crimson.
In other words we may be dealing with a metaphor within a metaphor here. Perhaps, in addition to any other meanings, there was the meaning understood by the Jews, regarding the sin that cannot be forgiven -- the sin that lives forever for the damned -- the sin of having suppressed the truth they were given, which ultimately results in a refusal/rejection of Christ Himself, who IS Truth.
The fact that this is being used metaphorically is evidenced by the passage itself, which is using metaphor after metaphor by way of explanation regarding getting that which tempts/causes you to sin out of your life.
The phrased after this series, in Mark 9:49, is also interesting: "Everyone will be salted with fire." This comes right before the warning about losing saltiness. If you look up "lose saltiness" in a Concordance, you will find that phrase is used four times in the New Testament, but only twice is it translated 'lose saltiness.' The other two times (Romans 1 and 1Corinthians 1) it is translated 'become fools' or 'become foolish.' Thus, salt itself was evidently a symbol for wisdom.
If everyone is salted with fire, that could simply mean that every one of us gains some wisdom through our pain in life.
And this, then ties in directly with what Jesus was saying which this question started about the worm, for before He quoted from Isaiah, He was saying that if your hand or foot or eye causes you to sin, cut it off/gouge it out, so that you will not go to hell.
Gory? NO, for He was using symbols known to the people then. The eye is the symbol of understanding -- as in "Do you see?" -- a phrase used then and now. The hand is a symbol for what you do -- "Put your hand to it; get going!" -- and the foot for where you go, or the direction you are headed in -- "Brother are you taking the wrong path there!" We still refer to these usages. So Jesus was saying that if something you think you understand, or something you are doing, or a direction you are headed is bringing sin into your life, get rid of it! Then He repeats the Isaiah warning of the worm -- but it was a crimson worm, and crimson is the color of sin. Cutting these things off will be painful, but everyone is salted, or gains wisdom, through that pain.
The entire passage ties together when the symbols are clear.