I think that you can find the use of the term in describing what is considered "the underclass." This is a group of people that form the base of the bottom of the capitalist economic structure. This particular group of people are cast as individuals that feed off of the bottom of the lowest form of the class system. Originally a British classification, they are seen as a group of people that will forever be wedded to the base of social construction:
This scum of the depraved elements of all classes ... decayed roués, vagabonds, discharged soldiers, discharged jailbirds, escaped galley slaves, swindlers.... pickpockets, tricksters, gamblers, brothel keepers, tinkers, beggars, the dangerous class, the social scum, that passively rotting mass thrown off by the lowest layers of the old society.
I don't think that the use of the word "scum" is unintentional. This particular grouping of people reflects a bottom- feeding mentality and one in which "the undeserving poor" label takes hold. This particular group is seen as one that is constantly wedded to the present, cannot envision any aspirations in the future, and are more inwardly drawn than other groups. The result is that this particular group is easier to demonize and cast off, demonstrating in judgment- based labels such as "the undeserving poor."
"I'm one of the undeserving poor" is a quotation from G.B. Shaw's Pygmalion. Alfred Doolittle, Liza's father, who is one of those "depraved elements" of the 'lower classes' you are referring to, is railing at middle class values, accusing "middle class morality" of being nothing but "an excuse to give him nothing."
Still, now that I've found this quotation I wonder if no such idea or even such a phrase can be found earlier, in Dickens's novels - or maybe in Herbert Spencer's writings?