In regards to specializing, salary can vary widely between specialties, but in general, most specialists are going to have an above-average salary which often makes it a little easier to pay loans off. But I would not recommend someone specialize just to make more money and pay loans off…specialize because you truly love the topic and want to do it for life. The money is just a nice benefit.
During your internship and residency years most people are going to go on an income based repayment plan and pay nothing or very little. In the past that has meant that balances grew during residency and then you could more aggressively pay them off after becoming boarded. With the newest repayment plan that has an interest subsidy that should help keep costs a bit lower during the training years by limiting your compounding interest.
Most academic internships/residencies will qualify as PSLF years but you’d need to stay in academia or find a nonprofit job for like 6 years after residency for that to pay off. And if you really crunch the numbers and loan payoff is your ultimate goal, you have to decide whether it’s better to make less in academia, pay less in total dollars, and get PSLF or if it’s financially better to just go into private practice and use the significantly higher private practice salary to just aggressively pay down your full balance. It’s not uncommon for private practice specialties to be 50-125k/year higher than in academia, so if you put all that difference towards your loans for a couple years it may be better/faster than staying in academia a total of 10 years for PSLF. But if you love academia and always envision yourself there, the PSLF is a nice perk especially given the lower salaries.
Some specialists may still do income based repayment and traditional forgiveness down the line, but I pretty quickly made enough that I no longer qualified for income based repayment. I owed less than average but paid them off in just over two years after becoming boarded and making my specialist salary. It would have taken longer if I’d owed more, obviously, but I didn’t have to worry too much.