I've been dealing with this very question lately.
I've looked into programs that will pay for loans after the fact and its NOTHING like what I'd get if I make the commitment now. I.e. the NHSC will pay up to $30K a year for service (commitment 2 years, will continue paying as long as you have loans). Well, with the $400K worth of loans (including interest) I will have once I graduate loans, $30K will ONLY be covering my annual interest.
My current program (state program, not NHSC) is paying around ~55K a year and if I stick with it, I will only have ~$100K in loans when I leave residency.
But then again.... I do have an interest in surgery and psychiatry, anesthesiology, and a few other "lifestyle" specialties. I'd hate to get to the end and decide that I'm missing out on the field I love because I have to go into primary care. Granted, I could always do a fellowship when my commitment is done, but what if what I love is not something I can get into with a fellowship. (surgery, anesthesiology, etc).
So, I'm going back and forth but I think at the end of the day (well, at the end of next week, actually) I'll end up swallowing my fear and cancelling my contract. I'm really quite frightened of those loans, but I don't want to get to the end and regret that I can't do what I really want.