As a Britisher I did not know the origin before, thank you. But, "pear-shaped" originated within my own lifetime? This has blown my mind as I cannot remember a time before this phrase existed and it seems eternal.
I'm not sure where it comes from just that it's a mildly humorous way of saying something completely failed.