that's an incredibly short-sighted view of what makes for a good or bad career... if you're not making big bucks in years 1-5 it's not worth it? i'm about to finish law school in a couple of months at age 25. i'll be in that profession for at least 40 years. making a yay or nay decision based on projected income from age 26-30 versus a lifetime of work is moronic imho.
the notion that public defenders are the trash tier of lawyers is also a misguided view. PD jobs are pretty difficult to come across here in CA... as long as we aren't talking about butt counties like mendocino. depending on the county, the pay can actually be quite good. for instance, in santa clara county (admittedly, an outlier), starting pay for an entry level public defender is upwards of 90k, which is hardly "ramen noodle territory."
you also consider the loan forgiveness factor of working in public service, which you can consider to be tacked onto your salary figure.
lastly, it's nearly impossible for young attorneys to get trial experience in the private sector. even if you get hired in a good firm, you're going to be doing work for a long time while they're sending their top sharks to trial... you'll never learn . and even after putting years into that gig, next time you're job hunting, you'll again have the same issue of not having trial experience. rather, you put your time in as a public defender/district attorney where you get nothing but trial experience, making you a valuable commodity if/when you make the shift to private sector.
but yeah, if your definition of a good career is one where you are guaranteed to make serious $ immediately, then maybe you shouldn't be a lawyer unless you're attending a top 25 school. computer science, engineering... those will get you decent paying jobs quick without needing to invest a ton of time pursuing a post-grad degree