Physical organic principles governing the spontaneous prebiotic emergence of proto-nucleic acids