I suspect that the differences between the various kinds of ponies are not genetic, but only phenotypic — a bit like the different castes of eusocial insects, except that rather than on larval nutrition they are based on some sort of magic whatever.
This explains how two earth ponies could have unicorn and pegasus children.
Furthermore, this also gives a possible interpretation of Cadence. In some species of termites and ants, apart from the main queen (or queens, in the case of nests with more than one fertile queen — it happens in some species), there also exist
immature queens — smaller queens that are kept unfertile as long as there are fertile queens, but that grow into a "full" queen if the queens are lost or die. It's sort of an insurance in case the nest loses the main queen(s) for any reason.
In my headcanon, Cadence has a similar role in the MLP universe. As long as Celestia or Luna are there, she's just an unicorn with wings; but should them disappear or die, she'd rapidly become a Celestia-equivalent power and take their role.