That said, I feel this is entirely a false dichotomy - there are actually very few people choosing between nursing and computer science, and it is not "diverting some of these students to computer science rather than remaining in health care". They are simply very different students and workforces with different motivations, strengths, and weaknesses.
I am sure we can agree that there are many fields that are worse off than computer science. Retail, administration, and many disciplines don't have the flexibility or financial compensation. To me, in some ways, it does sound like sour grapes when one says "well, look women have nursing. They make good money." Regardless whether healthcare is a good field, that creates a false dichotomy when there are many people (both male and female) who aren't in these fields.
Even digging into this false dichotomy, it is another discussion whether healthcare is actually more flexible, has fewer hours, and is a better career choice than software development. The grass is always greener on the other side, but I would say that only in healthcare does a significant proportion of the workforce have to work overnight shifts, 30 hour workdays, and have to deal with relatively hazardous or infectious materials.
I love medicine, it's a great field, and I really enjoy having an impact on people's lives. But similarly, there are intangibles in software development like the satisfaction of creating something and doing things that can touch people far away. I think that to split these professions into "male" and "female" is a huge disservice and it brings nothing to the discussion to say some female predominant fields have good earning potential.
PS. UCSF medicine is typically between 47 - 54% female each year. Not sure where you got the 58% statistic. There are a lot of applicants, so the administrators probably have a lot of flexibility on how they want to shape the class demographics.