Difference between "bare metal <-> RTOS" is much smaller than the difference between "RTOS <-> linux", since what most people mean with RTOS (typical example: FreeRTOS) is a very thin layer easy to poke holes at, and on the other hand, it also doesn't provide things most people expect from operating systems, like easy integration of complex drivers and networking stacks. So development for RTOS vs. bare metal is quite similar; development for linux is quite different.
The most notable thing RTOS gives you is parallelism in form of threads of linear code execution. In bare metal, you can use prioritized interrupts for very neat parallel FSMs with timing guarantees, but your functions start from the beginning of the function when triggered. It forces a different coding style entirely. "RTOS paradigms" are less real-time, though. RTOS may make integrating e.g. USB or TCP/IP stack easier (depending on which stack, and how the existing code is written), but it's still far from the ease-of-use you get with linux where USB and TCP/IP "just works".
So RTOS vs. bare metal is less significant decision than it sounds and more like a matter of taste. Also possible to refactor between using and not using one, after the fact.
HW is the driving factor, really. You use linux if you can afford the HW which conveniently runs it, say, you have the BOM budget in tens of $ and power budget in ~1W range, and need something like USB / networking (classic examples), large displays, something computing-heavy; i.e., want to leverage existing software in plug-and-play way.
You don't use linux when you want a very small, cheap, low-power solution, or don't need much existing large software pieces - we are talking about the $1, 100KB, tens of mW stuff. TCP/IP/networking is available for microcontrollers, too (like, lwip, mbedtls), so there's some overlap. There are also external offloading chip solutions, like the Wiznet "hardware" TCP/IP chips. But linux will be much more flexible, so it's kind of lower risk; it's easy to find people who can set up a linux on a small SBC and make it reliably do stuff like networking, USB and user interfaces.
The small microcontroller solution will be more difficult to achieve, with far fewer people available who can pull it off, but it has chances to boot faster, cost much less, and consume less power.
Our energy management IoT box is bare-metal microcontroller solution and we use Wiznet W6100 hardware TCP/IP / ethernet chip on it. And it is not plug-and-play, getting the Wiznet chip to work reliably is a task of its own; it's not a full hardware solution, and the provided example network library code is littered with bugs and security holes we have been fixing. We also have to live with fact that maybe 0.3% of customers suffer from connection reliability problems with Wiznet + some unlucky WiFi extender + some unulucky router, when all their other devices "mostly work". Embedded linux SBC would probably also "just work" with some random issues, but Wiznet can totally die, and the issue is undebuggable. Failure rate (maybe one in 300) is awkwardly in the transition area of "doesn't matter, can be ignored" and "causes colossal pain we must deal with". When one chooses linux, they won't be dealing with issues like this, but then maybe they are dealing with something else, like boot time. And unreliable drivers can be a thing even on linux, so always choose the HW wisely.
DFM, design for manufacturability usually favors the microcontroller solution, actually. If you are a large, serious player, you of course have resources to design your own computer that runs linux (something nctnico for example does). For a small player / hobbyist, designing an MCU board is a lot easier, and buying the $1 MCUs from Mouser/Digikey in tens of thousands units is trivial. You can't buy 10000 Raspberry Pis! If your product is based on a ready-made SBC because you were not able to design your own, check very carefully the availability and lead times of the SBC. Raspberry Pi has been sometimes completely unavailable in any quantity for months. That will kill your business if you depend on it.