How does one send MIDI files from iOS Garageband?
Unfortunately the answer is just as simple: you can't.

At least not using GarageBand for iOS only. It doesn't have an "export MIDI" function, in fact you can only export the entire project, not individual tracks, so I suppose it isn't too surprising.

This is not to say it is impossible to get midi from the software instrument tracks in a GB for iOS project.

The first idea that comes to mind is to open the .band file in Logic or GarageBand for Mac (transfer via USB or use the sharing option) then export the project or tracks as a midi file (actually I am not 100% sure about GarageBand, I know you can in Logic).

It would be nice if you could do this without having to resort to using a Mac though, (especially since Apple markets the iPad Pro as being more powerful than many laptops; the iPad version of GarageBand can't do this either) and it's not like it is a fundamental limitation of iOS, it's just GarageBand for iOS doesn't have the feature. If there is an app that can open the .band files saved by GB for iOS and save the software instrument tracks as midi files, you could do what you want entirely on your iOS device.

But it still wouldn't be possible with GarageBand for iOS alone, at least currently. I'd recommend submitting feedback, both in the App Store and the Apple Support website, IMO this would be a popularly welcomed feature if it is implemented, I don't use GarageBand too often so I was surprised the only export/share options was as a bounced audio track and project file.