If you've ever made a cream pie and it turned into a soupy disaster overnight, then you know about this common frustration.
Custards or pudding thickened with both eggs and starch, can end up watery or soupy from either under cooking OR over cooking, but the biochemical causes for the runny filling differ in each case.
It's all in the eggs. Yolks and whites both contain enzymes that break down carbohydrates, like starches. In fertilized eggs, the enzymes amylase (found in yolks) and lysozyme (in whites) have an antibacterial function. They protect the growing chick from infection by breaking down carbohydrates on the outer layer of bacteria cells.
However, for cooks, these enzymes are a potential source of woe. When heated to boiling, the starch-digesting enzymes are inactivated, but if undercooked, the amylase and lysozyme start to break down any starches present, like the flour used in cooking.
The same result can occur when the custard is over cooked.
Egg whites contain long string-like, protein molecules. Heating too quickly or too long causes these protein molecules to change shape, toughen and shrink. When overcooked, custard looks curdled and spongy rather than creamy, and the proteins' shape change squeezes out water molecules from the whites and prevents the milk from thickening.