It would depend on resources available to make it viable. It's not just about knowing that a thing exists-it is having the technological resources to continue forward with the research.As I said, Trek has done this many times in the past, because tech is virtually always treated as a MacGuffin rather than being thought of as the natural outcome of advances in science.
Look at how the real world worked once the scientific revolution happened in the West. Nation-states needed to adopt technology (as Japan did) or were overrun.
That wouldn't stop Klingons, Romulans, the Dominion, Ferengi, etc from investigating it.
Again, it's not that ethics make no sense, it's that if the Federation invented this technology, other states would as well, even if all knowledge was suppressed. Scientific breakthroughs flow from the physical laws of the universe, and their applications in chemistry, biology, etc. It's extremely implausible to think something like the spore drive would be invented once, but no one would ever come up with it again. It's like arguing the atomic bomb was only invented on Earth, but by no other Alpha Quadrant species.
Honestly genetic engineering is a good example here, because even though right now people in the west have icky feelings about it and are passing laws to outlaw human genetic modification, China and other Asian countries going full speed ahead with it, because it doesn't conflict with their idea of medical ethics. People in the biological sciences are already predicting this means that any attempt to legislatively ban "designer babies" will fail, because rich people will just go to Asia to get it done. Now imagine in another two generations if everyone in China can get IQ enhancing gene therapy for their children, while it's still banned in the U.S. and Europe. What do you think would be the result?
This is why I added my caveat about Stamets essentially erasing the spore tech and himself from existence.