I disagree. I think socioeconomic class is a result of this issue. If you finish high school, get a job and hold it, marry, and then have children, you are likely to come out reasonably well economically, even go on to higher education if you did not do so immediately.
Saying that illegitimacy is "caused" by "class" is the same as saying it is "caused" by race: the rationalization denies that the individual has the ability to judge costs and make rational decisions.
My sister got married when she was 16. No, she was not pregnant. Her husband was 20. She finished high school, he got a good job and has been there for over 35 years. She had her first child at 18 and her second at 22. She has a good job. They are solidly middle class, enjoy great vacations, have investments, own a home and should have a nice retirement. They have been married 40 years. The American Dream worked for them even though they married very young.