I was supposing that the technology of the artificial womb is perfected. Of course that would be very difficult. Quite possibly, we will first develop an artificial womb which is distinctly inferior to a biological womb, but which would still be useful for seriously premature babies, being an advance over a mere incubation box.
The fact that infant formula is known to be inferior to mother's breast milk does not mean that it would necessarily be impossible to create an infant formula that is as good as (or conceivably, even better than) mother's breast milk, it just means that it hasn't been done yet. No one has as yet gone to the trouble of identifying every chemical that is present in normal breast milk, and of then putting together an artificial version in which all the same chemicals are also present. There is no reason why that couldn't be done, it just hasn't been done because it would be very expensive and people are still buying the cheaper, inferior version of baby formula, or breast feeding if they are not satisfied with baby formula.
Similarly, if we can identify every chemical that is present in the blood of a pregnant woman, we could, with enough R&D, create an artificial version that is exactly equivalent (or possibly even superior), and if we can also build an interface mechanism that will work the same way a placenta does, to connect the fetal blood system to the artificial blood supply, that solves the basic technical problem (the problem of floating the embryo or fetus in an equivalent to amniotic fluid is relatively trivial, we could do that easily). This is not like inventing such things as faster than light travel, time travel into the past, or anti-gravity, all of which are science fictional dreams which are probably going to remain impossible despite any amount of research that we may do. The artificial womb is a perfectly reasonable technology to invent.
It is, of course, possible that there will be some technical flaw in the artificial womb which will not be immediately apparent but which will be noticed years later when the babies of such devices grow up, and demonstrate some unusual pathology which is traced back to their artificial gestation. But again, even if that should occur, there is no reason to think that the problem could not be figured out and fixed. Maybe the fetus needs to hear a mother's heartbeat. If so, that is easily arranged by means of a recording. I don't see any insoluble problems here.
Of course, one never knows how difficult a given research project is, until one actually does it. The development of nuclear fusion power is a good example. I well recall that in the 1960's it was confidently predicted by all experts that nuclear fusion would become a viable commercial power source in a matter of decades, certainly before the year 2000. And of course, that didn't happen, even though many billions of dollars were spent on fusion research (research which remains ongoing to this day). This proved to be a harder problem than we expected. Perhaps the artificial womb will also prove to be a more difficult technical problem than I have anticipated. Even so, if we do enough research, the problem will be solved, inevitably.
Medically speaking we know perfectly well that both pregnancy and childbirth carry very serious medical risks to the mother, aside from presenting tremendous discomfort, pain, and inconvenience in various different ways. It seems obvious that if we can perfect an artificial womb, the medical advantage for the mother is enormous. Babies will also benefit since the pregnancy will be better controlled, and such problems as premature birth would never occur.
We could still ask how expensive such artificial wombs would turn out to be. Even if they are medically desirable, that doesn't necessarily mean that they would be affordable for the average mother. But that is a separate issue, and it is too soon to worry about it, since we do not as yet even know what such devices would actually cost. And we also do not know how affluent society in general would be, by the time such devices are perfected.