I've owned and shot both.
I found the M9 to be more accurate. But that might be me.
I like the Glock night sights. I don't know if you can get them on the M9 or how much they cost.
The M9 is more comfortable in my hand. But that's my hand and not your hand.
I think the M9 is much better looking.
They are both easy to field strip. For some reason, the Glock doesn't get as dirty. No idea why.
The biggest difference is the double action only way the Glock works as opposed to the decocker double action M9. The Glock is certainly simpler.
I had no reliability problems with either.