If cost is less of a concern, you could set up another micro with a decent slab of SRAM (you can buy a 128 kByte SPI SRAM (giving 2x16 sec of buffer time) for <$3), which accepts the data from your workhorse micros and buffers it, then spits out packets of data at the request of the host, whether that's a RPi or anything else.
Of course, you could do the same on the STM32M4F's if you have enough free RAM and if servicing requests from the host won't get in the way of your main program. I do agree that you shouldn't expect a RPi or anything else running Linux/etc to never drop bytes when operating as a slave (with minimal FIFOs and no DMA).
Also, if cost is a concern, consider using a TL-WR703N router ($22 on eBay) with OpenWRT instead - it's got wifi, LAN, a USB port, a single serial port and probably enough grunt to serve the data over the network, store it on a USB disk, etc. Swapping the flash on it for a 16MB chip (up from 4 MB, $3) is generally a necessity. If you do, build a new binary from the bleeding edge source or you'll have a headache. Been there, done that.