I guess we could.
Using a whole Raspberry Pi seems like overkill, though: Support for a wide variety of common USB serial chips is already built into esphome. https://esphome.io/components/usb_uart/
Just wire it up with a cheap dev board, build a firmware image for it, and that end of things is... done, right?