I went to NYU and ended up graduating with 465k, which ballooned to 565k after residency (had to defer because I needed every dime from my GPR to get by). My monthly payment would have been around 7k for a standard 10 year plan. I don't know what the 30 year plan would have been, but considering I don't make 7k after taxes, and many GP's fresh out of school (my friend included), do not, then yes... expect 30 years if you want live on more than ramen and misery.
Now... with REPAYE, I pay $661 a month and that number will likely go down since that was based on making $125k a year and I'm not making that anymore. The number will likely keep ballooning to maybe 1.5mil before it's forgiven tax-free. This is important to keep in mind, because if you do income-based repayment and are NOT in a non-profit, your forgiven tax amount is taxable and you may end up owing more on forgiveness than you ever took out to begin with. If you want the dentist life-style (depending on your definition of this), then I'd plan to work in a non-profit (as odd as this may sound), however keep in mind that PSLF may change, and you can only be eligible for the terms present during the time of your loan disbursement. Working where I'm working now, it never would have mattered what my debt was or what my monthly payment would be, as it'll all be forgiven tax-free and my payments are always a function of my income, which makes them always affordable. Pre-COVID was ~$6,600 a month and only $661 went to student loans (I paid off a lot of my private ones, otherwise, that'd be a much higher number lol). Pretty nice being a 9-5 with patients I love seeing and loan forgiveness that won't bankrupt me in 20 years.
For specialty, it depends. Pedo makes their money on volume mostly, so while they also could pull in what an endodontist makes, it would require longer hours and more patients, as the procedures tend to be quicker, smaller in scope and reimburse lower (most dentists who accept medicaid are pediatric dentists). I'm applying to pedo now, but not for income. I've worked with kids for over 2 years and I just enjoy it. However, if things return to pre-COVID levels, then I'd say specialty can be worth it.
Sorry for such a lengthy response. Hopefully I helped you out but if not, just lemme know and I'll try again