A chick can't develop outside of it's egg, so you won't see an embryonic chick growing and wiggling in a pool of substance leaked from a cracked egg.
Centuries ago, people believed in spontaneous generation: that life can arise from non-living things. A common example of this was the fact that maggots would "arise" from rotting meat if left to rot.
Although this theory was disproved, it is not rare to find someone that still believes it, because they seem to see it happen.
In the 1800's, before DNA was discovered, it became accepted that "like gives rise to like" - that is, chicken eggs will hatch chicks (not peacocks or mice), pea seeds will always give rise to peas, etc.
DNA was 'discovered' in the late 1800's by Johann Friedrich Miescher. He extracted a new king of organic moleculr out of cell nuclei, which he called "nuclein". Although Miescher did develop some hypotheses about how "nuclein" might be involved in heredity, he ascribed to the view at the time that any one type of molecule would be too simple to account for all the variation seen within species.
It would be about 75 years before the magnitude of Miescher's discovery would be fully understood, and that DNA is the basis for heredity.
Chicken eggs, if they give rise to anything (which will depend on if it is fertilized and properly incubated) can only give rise to chickens. Whether they are fertilized or not, they can't give rise to worms. A chick can't develop outside of it's egg, so you won't see an embryonic chick growing and wiggling in a pool of substance leaked from a cracked egg.
If you buy bananas and let them ripen and rot on your kitchen counter, you will suddenly find a lot of fruit flies in the house. The fruit flies did not spontaneously arise from the bananas; they came from eggs laid on the bananas before you bought them.
If you buy bananas and wash them well when you get home, and let them rot, you will not find fruit flies buzzing around them.
That is why your rotten egg didn't give rise to those little worm things.