The Lord Jesus was quoting from Isaiah 66:24: And they shall go forth, and look upon the carcases of the men that have transgressed against me: for their worm shall not die, neither shall their fire be quenched; and they shall be an abhorring unto all flesh.How or why would there be a worm in Hell
It is simply a metaphor for the ETERNAL agony and torment experienced in the Lake of Fire.
JOHN GILL'S COMMENTARY
Where their worm dieth not, and the fire is not quenched. The passage referred to, is in Isaiah 66:24, and as there, the words are spoken of such, as transgressed against the Lord; so here, of such as offended any of Christ's little ones, or were offended by an hand, a foot, or eye, and retained them: by their worm is meant, their conscience; for as a worm that is continually gnawing upon the entrails of a man, gives him exquisite pain; so the consciences of sinners, will be continually flying in their faces, bringing their sins to remembrance, accusing them of them, upbraiding them with them, aggravating them, tormenting them for them, filling them with dreadful anguish and misery, with twinging remorses, and severe reflections, and which will never have an end.
This will be always the case; conscience will be ever distressing, racking, and torturing them; it will never cease, nor cease doing this office, and so the Chaldee paraphrase of Isaiah 66:24 renders this phrase, , "their souls shall not die"; but shall ever continue in the dreadful torments and unspeakable horrors of a corroding conscience...