I think so many villains are doctors or scientists for two reasons.
One: Many villains have origin stories based around medical or scientific research accidents. So, their being a doctor gives an easy setup for the story and establishes them as intelligent individuals who are also in harms way when it comes to dangerous, possibly gamma ray-related experiments.
Two: There is a classical concern about medical and scientific research, where some experiments and concepts are so beyond the everyday that they become almost like magic to the general public. Magic, the unknown, is often feared. So, villains as doctors or research scientists tap into a general distrust in the public. Of note may be the rise of comics during the Cold War era, where scientists were both revered and feared, for they both constructed weapons of our feared demise and technology which could take us into the stars. Many people don't quite understand medicine; so, a doctor carries an air of mystery. Many people don't understand broader science even less; so, a scientist carries an even greater air of mystery. The unknown, mixed with the idea of individuals tinkering with powers beyond general comprehension, is a rather compelling reason for paranoia and suspicion in the general population; thus, making a doctor or scientist a perfect villain for people to project their concerns onto.