All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
In case you are going to take a loan without incurring benefit (interest) and you are more likely to return the loan, then you may do so. Yet, to avoid such thing is more appropriate, unless under forcing necessity. This is so because you may turn to be unable to pay back the loan and render yourself indebted and hence you harm yourself financially and psychologically.
If you intend to borrow with interest to be claimed at the time of the payment or before it, then it is prohibited, since Riba (interest and/or usury) is among the greatest sins. It must never be approached unless and until one is obliged to do so.
It is confirmed that the Prophet said: “Allaah has cursed the one who consumes Riba (i.e. usury or interest), the one who gives it to others, the one who records it and the one who witnesses it (its transaction).” He said: “All of them are equal in sin.” [Muslim]
Your learning medicine in order to benefit the Ummah (Muslim community) is not a necessity which makes committing prohibitions pardonable, since the Ummah has, thanks to Allaah, enough doctors.
Allaah Knows best.