A bit part of the problem here is that people keep thinking of doctors as wealthy. For doctors who are consultants now, this might be the case, but for people who are JDs now, it really doesn't look appealing.
Remember that a medical degree is 6 years, so longer than most. Some people do a medical degree after doing another undergraduate degree, so this makes 9 unpaid years. And due to the way medical degrees work, having a job while studying can be really, really hard, or impossible.
Then comes the poorly paid JD years. It isn't just a few years. It's possible to be a JD for 15 or 20 years. This might include a PHD or overseas fellowship time, which is often very poorly paid or unpaid.
There are also a lot of costs associated with these years. Fees associated with training tend to be steep. JDs also get very little choice about very frequent moves, and the costs associated with these add up quickly, especially if the JD had a partner or children.
Finally, you become a consultant. Yes, some specialities earn a lot, particularly procedural specialities, which skews the average. However, people are coming to this later and later. Many doctors also have to retire early ish as the physical demands of oncall etc get really hard as you get older.