Worm itself is eatable, when it is cooked 'appropriately'.
For example, grilled or stir-fried worms are eaten worldwide. They seem to be grotesque, but hygienically eatable, because worms are dead and virus and germs are sanitized by heat.
But, maggot-infested cheese is not the case. Alive maggots are included in cheese. They can destroy intestine.