Lol. Deciding is the hardest factor
It's simple though. Get the M8 if you want the best craftsmanship, best built, best speakers, and probably the best skinned Android and lots of XDA support. Needless to say you will have a sub par camera (I am not a believer in higher megapixels crap, but still hTC's Ultra Pixel is just plain nonsense), and poor GPS lock (4-5 times slower than a polycarbonate / plastic phone).
Get the G3 if you want the phone with best screen to body ratio, and also I love the design, it looks really elegant, at least to my eyes. QHD display, I hate that, but some things will be crispier, like texts and stuffs. But it has poor contrast ratio. The camera IMHO is very good, not as good as Z2 or S5, but it has OIS, which every flagship phone SHOULD have. Now about the bad part, just look at XDA, there is one kernel, and it also doesn't work nice (you will have to reflash the kernel each time you reboot the phone, WTF!), and I personally have no idea about LG's skin. Some says it's a hybrid of TouchWiz and LG's own skin, but if YouTube reviews are to believed then I found it as slow as TouchWiz! I could be wrong here though.
Moto X 2014, well, if you are on a budget then this is the phone to get. A balanced phone, with best optimization you can ever get. The screen is extremely saturated, which is a negative, but well it depends on your usage pattern. The screen to body ratio is great too, it's actually slightly smaller than S5 and has 0.1" more display size. That outer aluminium frame works as an antenna and looks sleek too. All the Moto features are nice. But that camera. In simple word, it is not worthy of a flagship camera, as simple as that. G3, Z2, S5 they all are miles better, and even G2, S4 are too. So if you can trade off the camera part, then get it, you will love it.
Z2, IMHO the best camera (I don't care about out of the phone shots, every person can do some tiny bit of editing), a nice IPS display, stereo speakers, however not that loud, IP67 certification, if that matters, a nice looking phone, however glass build, and it's a Sony after all, keeping aside my fanboysim
But poor screen to body ratio, the phone is bloody big being a 5.1" one. And there is DoomLord in XDA, so the kernel management is checked.
Read the G3 vs Z2 review extensively, and separately too, and I think I personally am going for the Z2. There is a trade off or a drawback in each phone, just get the one which has less in number, according to your priority of course.