The reason was that the multi-release class files were not being picked up from META-INF/versions/*
because I hadn’t set the multi-release flag when I built my shaded jar.
I needed to add:
Multi-Release:true
To my manifest, and everything started working.