One of the reasons I use the STM32F103CBT6 is the large number of devices that already seem to use it, and it's also been cloned by Chinese companies. I don't plan to use the clones unless the original is not available, but it does suggest that the chip is ubiquitous enough to be cloned by others, which is kind of when you know it's going to be around for a while, for example, like the Z80 or Intel processors. In a way, AMD, while being competition to Intel, is the best thing that happened to it, because it ensures that no one is going to worry about the architecture being neglected or obsoleted.
It's very hard to avoid all specialized chips. Obviously RISC-V would be cool to try, but is not really there yet until a major manufacturer uses it in place of ARM. But for example, I use the SI5351A clock generator for the VNA I designed. I'm not sure how long that will be around, but it's a hard part to find an equivalent of or replace easily for the price, which is less than a dollar.
I designed my own version of the bluepill just so if for some reason the others become unavailable, one can make one, but the nice thing about having the $2 bluepill is that it already comes mostly ready to go, and you just plug it into your board. I also made a bluepill for the STM32F405RGT6. This is used for a few dev boards, but of course is not nearly as common as the STM32F103C8T6 part.
But it would be good to try to have a collection of open designs that could be recycled in the future, even if some reprogramming was needed.
Aside from being a generally decent, easy-to-use chip, STM32F103 in particular has three things going for it: ST tends toward a common pinout for each package type so that migration to other members of the STM32 family won't usually require much more than a recompile with new libraries. ST has also "committed," for what that's worth, to 10-year longevity of their commercial MCUs. (Possibly coincidentally, that is also the period of time for which a mask work copyright holds.)
Last but especially worth highlighting is multiple sourcing: unlike the ATmega328P, you can go on LCSC and buy 99.9% drop-in compatible 32F103 clones by no fewer than four other foundries. (Possibly also coincidentally, the STM32F103 is no longer protected under mask work copyright.) Barring displacement by some new killer hotness, say RISC-V, or some science-fiction-magnitude shift in semiconductor physics, I expect at least one of those other devices will be available for quite a while.
Anyway, the ability to modify a full design to suit wants and needs is the great promise of OSHW. Some future port to ESPduino or RVduino or Googleduino or whatever the cool kids are using in 10-20 years doesn't have to be your problem. If it's a design worth building in 10-20 years, the odds are good that someone will already have adapted your design and posted their fork of it. AADC's famous LC meter comes to mind for one example. I suggest you spend your worry on other single-sourced parts in your designs which could take more effort than an MCU to drop-in replace, and accept their pull request when it comes.