There is UEFI Byte Code (EBC) which at least in theory can be used to write drivers.
http://www.uefi.org/sites/default/files/resources/EBC_Driver... Anecdotally, cards come with EBC drivers which flat out don't work.
There was also Forth Fcode used in Open Firmware. It was never widely adopted.
Basically any universal driver framework is going to be compromised in some way that you won't like. Either it'll be too slow because it cannot use specific features of the operating system. Or it will annoy OS developers by tying them to an ABI which they don't want to support forever. Or (like EBC) it won't be widely supported and/or won't work at all because in reality no one cares about this.