Even by aristocracy standards Charles and Diana had pretty bad childhoods
Charles - the Queen moved abroad for 2 years when he was between one and three to live the carefree life of a junior navy officer's wife in Malta - leaving Charles with her parents and their Edwardian parenting ideas. Then he was shipped off to boarding school at 8.
Diana - witnessed domestic violence from her father towards her mother and had to suffer her parents' extremely bitter and acrimonious divorce and custody war that played out publicly in the press. In those days you could only divorce for cause so the her father sued for adultery, calling Diana's grandmother as a witness against her mother. He demanded full custody of Diana and Charles and when he won, shipped both off to boarding school shortly afterwards with Diana's mother only allowed occasional visitation.
So not very surprising they were not the perfect parents