There are a handful of these companies out there. Collabora, KDAB, D. Richard Hipp's SQLite company, and if you're lenient enough you could also include companies that productize their open source package such as NextCloud or The Qt Company. Heck, Red Hat (sorry, IBM) regularly gets pulled in to improve software across their stack, kernel or otherwise.
You could also include non-profits like the Linux Foundation, Blender Foundation or (new!) Godot Foundation, which do the same thing but without having to disguise as consulting, because development of the software itself is important enough to the industry that can pool its resources by donating to the respective foundation.
Still only works for important enough packages. I don't think there's a way around that. An open source project generally has to provide massively outsized value so that a handful of developers can capture a fraction of that value for paid maintenance.