I've got an iPad Pro 12.9" 3rd generation. It's got an MDM on it but it's locked up and the person that it's assigned to cannot recall the passcode.
I also cannot get it to connect to wifi since I cannot get into it. If I send a "clear passcode" it never reaches the device.
There's a couple options. One is restore it using iTunes (or Finder in 10.15). The other is getting an Apple Camera Connection Kit and a USB to Ethernet adapter. This will give you a USB-A port on the adapter to plug the Ethernet adapter into, then ethernet into that, allowing you to use the iPad on hardwire and then it'll receive your MDM command. One possible caveat is that if the USB Accessories Restricted mode is enabled and the device is locked for more than an hour then the accessories won't work and a restore is the only option.