How did 'nature' semantically narrow to mean 'medical science'?

Thank you for this question, the understanding of which depends on a prior awareness of the history of ‘science’, first in ancient Greece and then (thanks to the Arab civilisation) its resumption in the Late Middle Ages through to the Enlightenment and onwards.

The second point of which to be aware is that many Greeks by the 5th century had begun to separate in their minds things caused by human action from things outside human agency. The notorious example of this is that many of the so-called ‘sophists’, such as Antiphon, had begun to distinguish between ‘nomos’ (meaning law/convention and by these thinkers to things and causes whose existence is only a matter human cultural intervention) and ‘physis’ (nature, in the sense of the truly real). Notoriously, this led some to question the validity of law and morality themselves, as ideas with no ‘real’ existence and therefore no claim on our obedience. Plato, in his dialogue Gorgias, makes his character Callicles insist that justice is no more than a device of the weak to deny the strong their ‘natural’ right to have it all their own way. [It is not difficult to think of people who think this way today.]. Much of Plato’s ethical project was to try to show that virtues like justice, wisdom and self-control did exist as real things in ‘physis’ not merely as ‘nomos’.

At the same time, came the development of mathematics, astronomy and cosmology/cosmogony (no doubt from Babylonian, Egyptian and, via these, ultimately Indian beginnings). First, in the school of Miletus (C6 BCE) Thales proposed that everything in ‘nature’ was actually water in some form, and that the differences between different substances and their observed changes (such as seed to plant, say, or grass to milk via cow) must, if not magic, be because it is all in some way originally the same, in changing states. They took, in a way, magic out of the picture. This culminated in the atomism of Leucippus and Democritus, where everything is made of combinations of tiny invisible particles, joined up together somehow. Of course the average Greek in the street thought this at best crazy and at worst impiety against the gods.

But here we can see how a word like ‘physis’ can become detached from its roots in living nature and come to represent all there really is. So when he wrote the Physics, Aristotle was writing about what we now call physics. And physicists will tell you that chemistry and biology boil down to physics!

With the rise of Christianity, this kind of science came to be seen as dangerous and heretical. The early christian fathers did their best to destroy all traces of it, and might have succeeded but for Arab scholars, who translates Aristotle and others into Arabic.

A similar process was repeated between the Late Middle Ages and the Enlightenment. Most science concerned ‘physic’ and so the word went back to that use. Alchemy was deeply suspect, until chemistry gradually emerged. What really enabled physics to return to its Aristotelian use was probably the arrival of direct astronomical observation through the telescope. However, it may also be significant that in the late 16th/early 17th century, a French physician named Jean Chrysostom Magnen (Iohannus Chrysostomus Magnenus 1590-1679), working in the University of Dôle in the Free County of Burgundy, published his work Democritus Revivescens Vel De Atomis - Democritus Reborn or On Atoms. He joined the medical faculty of the University of Pavia in Italyand published his work in 1646. As far as I can tell, he did not use the term physics, and still used the Latin term elementa. The doors did not all open at once or the language change. But it was a start.