Not directly related to my question but is it common to make such a big change (change the architecture) during the lifetime of a normal product ?
Yes and no. You don't switch MCU families like you change underwear, but having the
option to redesign into different MCU while having an
idea that "oh, it will take two weeks to port" instead of "I have no idea whatsoever, maybe month, maybe a year!?" is a great safety net.
If you write your whole app to depend on features of an RTOS which is not available on different MCU family you have painted yourself into corner. Similarly, if you base your code into availability of vectored, priorized hardware interrupt controller with software interrupts available, like I usually do, this rules out some weird architectures without major modifications, too.
Most important, by far, is the separation of your application logic and peripheral access, using good interfaces which make sense, so that rewriting the peripheral part is trivial. This is totally orthogonal to the RTOS issue. And BTW, this is exactly where stuff like "STM32 HAL" drives you in the wrong direction: now your whole codebase depends on ST's interfaces and you can't switch, not even to different STM32 families without doing modifications here and there as the underlying hardware leaks to the abstractions. What you can do, instead, is to write abstractions that match your application exactly, and then the underlying peripheral code is easy to rewrite.