As far as I can tell from Google Books, this is an exclusively British idiom. It is used of those (primarily the rich and the young) who enjoy freedom from want or responsibility and behave as if they are unconscious that they were merely born into this freedom and that others (the poor and adults) are not so fortunate.
The earliest appearance of the phrase in the Google Books corpus is in the works of Eden Phillpotts, who uses it in five different novels published between 1912 and 1919. In the earliest of these it seems already to be proverbial, in a sense very close to today's usage:
1912 The Forest on the Hill, in the context of a discussion of the 'greedy rich' who have no inclination to practise charity: "Nothing hides the truth of life from people like money," said Miss Snow. "I don't like rich people. They only try to please one another. 'Tis natural, no doubt. There's a gulf fixed between poor and rich, and, so long as there be poor and rich, 'twill never be crossed. The rich don't know they're born; but that's the first thing the poor find out." "Doan't be too hard on the rich," said Jacob. "'Tis only one in a hundred of them properly enjoys his money. They suffer from all sorts of complaints we can only laugh at."
In later works Phillpotts extends the sense to broader deficiencies of consciousness:
1913 The Joy of Youth Well, honestly, these fellow creatures of yours don't know they're born. That's the solemn truth about them. Therefore, being unconscious, they don't exist as men and women at all. They are of the company of cattle and turnips.
1915 Old Delabole "Natural creatures, without the inner light, never lose it [self-respect]. And how much the more ought we with souls to keep it." "The creatures don't know they're born," answered Ned. "So they can't lose what they haven't got. Look at them bullocks in the field. Not one of them knows he's a bullock."
1918 The Spinners "It's certainly difficult to decide about some people, whether they're alive or dead. Some make you doubt if they were ever alive." "A good many certainly don't know they're born ; and plenty don't know they're dead," he declared. " To be in your grave is not necessarily to be dead, and to be in your shop, or office, needn't mean that you're alive," admitted the lady.
But in 1919 he seems to revert to the narrower sense:
1919 Storm in a Teacup, in the context of a discussion of a broken marriage: "There was all sunshine and no shade, and Medora, so far as I can see, instead of blessing her good luck got sick of so much uneventful happiness, like a child gets sick of too much barley-sugar." [...] "We middle-aged people can always see the young looking for trouble. 'Tis part of their natural curiosity and daring. They don't know they're born in fact, and that's a thing you can't teach a person."
It appears to me that the phrase emerges around the beginning of the 20th century, with pretty much its current meaning. As to where it came from, I suspect evangelical Christianity's emphasis on mankind's being born into sin and misery—"Man is born to trouble, as the sparks fly upward" Job 5:7—plays a large role, as in this hymn, from an 1806 collection reprinted throughout the 19th century:
O WHAT a pleasure 'tis to see
Christians in harmony agree,
To teach the rising race to know
They're born in sin, expos'd to woe!
The root meaning seems to be "They don't know what they're born to".