The Doctor has made many conflicting statements about his qualifications. He certainly studied human medicine, and in The Moonbase he says that he gained a doctorate under Joseph Lister in Glasgow in 1888. However, Lister left Glasgow years before that date, so the Doctor is either being vague or is lying.
He can carry out such basic tasks as resetting dislocated fingers (The Smugglers), but perhaps the archaic nature of his knowledge (he gives incorrect advice on fever treatment in The Ark and can't so much for blood poisoning in The Myth Makers) leads him to deny being a doctor of medicine (An Unearthly Child, The Krotons). His advanced medical efforts in The Sensorites rely largely on chemistry skills, and he has local medics to help him.
The other possibility is that he failed to get an attempted medical degree (as stated in The Rescue) and, knowing the condition he was treating in The Moonbase, exaggerated his achievements. In Robot, knowing he has a doctor on board, he renounces all claims to a degree save a 'purely honorary' one, which turns out to have been acquired from St Cedds, Cambridge, in 1960 (Shada).
However, at some point the Doctor does gain the advanced medical knowledge he uses in The Twin Dilemma and The Trial of a Time Lord. Perhaps the gap between The Deadly Assassin and The Face of Evil (see The Doctor's Age) is the most likely place for this to happen, as he's uncertain about a broken arm in The Seeds of Doom, but familiar with 50th century medicine by The Invisible Enemy. By the time of Remembrance of the Daleks he's learnt to diagnose by touching someone's ear.
Before leaving Gallifrey, the Doctor gained a doctorate of some sort from the Prydonian Academy (The Hand of Fear, The Deadly Assassin), qualifying, with Drax, in the class of '92 (The Armageddon Factor). His teachers included Borusa and Azmael (The Twin Dilemma), the latter possibly being the tutor who understood artron energy (Four to Doomsday). Since he knows so much about law (The Deadly Assassin, The Stones of Blood) it is possible that he qualified in this area.
However, on many occasions the Doctor has called himself a scientist (Planet of Evil) and engineer (The Aztecs, The Mind of Evil). Perhaps he's telling the truth about a combined degree when he calls himself a doctor of many things (Revenge of the Cybermen).