Various RTOSes are taking up the challenge of providing a vendor-neutral API. I can verify that the STM32 port of Zephyr is usable, although lacking some drivers:
https://www.zephyrproject.org/doc/api/api.htmlProblem is, designing a flexible vendor-neutral API with low overhead is fundamentally
hard, and they all end up as lowest-common-denominator solutions to some extent. Zephyr needs to attempt this because it is ultimately trying to enable composable systems where the software components (e.g. network stacks) may come from different vendors, while mediating concurrent access to hardware.
For many applications it's better to write an application-specific HAL that contains precisely the functionality you use and port that between vendors on an as-needed basis.
So far the Arduino folks have been doing a good job keeping AVR8, SAM3X and SAMD21 in the ropes, and TI folks is looping in MSP430 too.
There's already a port to STM32 that works with the common F103 boards
https://github.com/rogerclarkmelbourne/Arduino_STM32. I don't personally feel the Arduino hardware abstractions qualify as "good" but that's a matter of opinion.