RTOS Over UART protocol
Yes, it is generally a GREAT idea to separate functionality in this manner when an RTOS is in system. Great care needs to be taken to ensure mutual exclusion between tasks and shared resources such as common memory or peripherals as to avoid race conditions and unpredictable behavior. A common approach to this problem is by blocking each peripheral behind a "gate-keeper" task that manages the data flow in and out, typically issuing a callback function to the caller when the expected data has been received. Read this article (Chapter 7 goes over this specifically) from the FreeRTOS documentation. That being said, the bare metal approach can be perfectly adequate while having tighter coupling between functional modules of software.