I have both and you really cant go wrong with either. The decision really comes down to how long you intend to keep the phone for and how you use your phone.
From a hardware perspective, the N5 is simply better than the Moto X. The Moto X is the smoothest android phone on the planet until you compare it to the N5. The differences however is only noticeable when you compare the two side by side. Some may disagree, but the N5's camera is noticeably better than the X, especially for low light pics. IMO, the X's low light shots are not usable. I dont think its a hardware issue, but rather the camera's software for the X still needs a lot of work. The camera really bumps up the ISO for low light shots and as a result the images are extremely noisy.
The only noticeable hardware advantages the X has over the N5 is the speaker and the reception.
Software is where things get interesting for me.
Stock Android is beautiful and fortunately both run stock. Interestingly, what really tempted me to purchase the Moto X was the semi-touchless control on the N5. I found it to be extremely useful and the Moto X just took it to another level. Active notifications, touchless control, and moto assist really enhances the stock Android experience. It simply makes life easier.
In the end, for me, the software enhancements of the X won me over and it was something that I really did not expect. I am a self proclaimed Nexus guy and a hardware geek. I have been using Nexus phones exclusively since the N1. Even though I loved the gorgeous N5 screen, the smoothness, and size of the N5, I still perfer the X.
If you mainly use your phone more as a multi-media device (ie gaming, surfing, camera etc) I think the N5 is the way to go. If you want a phone that simply has great reception that is able to make your life just a tad easier, the X is the choice.