Honestly it depends on what you want out of your phone. The Nexus is the obvious choice for devs and flashers alike, it's a dev phone, period. The phone just came out a couple weeks ago and already has over a dozen roms, and a growing number of developers. The Razr on the other hand still hasn't seen anything, so if unless you're content with waiting for Motorola to officially push ICS whenever that may be, you might want to look else where. Coming from the Bionic, I'll be the first to tell you how much of a pain it is to have a locked boot loader as well.
Let's break it down though.
Build: Most people are going to go with the Razr here, it has a solid build and can really take a beating. That being said, form factor is a big part of overall aesthetics and the razr felt too wide and awkward for me. The Nexus feels great in hand with the curvature and if you're worried about build, get a case? The speaker is a bit low on the Nexus, especially when faced up and the speaker is against something, but when listening to music I usually use headphones anyway. The speaker is not so low that you won't hear calls, so don't worry, I just find that I would like it louder when listening to music, watching netflix, etc. It's fine for calls, speaker phone, notifications, etc.
Screen: Both have great screens, but the Nexus has the clear advantage, just going by specs.
Software/support: The Nexus wins here, it's Google's baby and will always be first in line when it comes to updates. Nobody knows when other phones will even begin to see ICS, plus devs will always be cooking something new for the Nexus.
Battery: Honestly, this seems like it differentiates with personal experiences. I've heard 15-20 hours from enthused Razr owners and I've heard 4-5 from disgruntled razr owners. But a major turn off for a lot of consumers is the non removable battery on the razr. Because of this, you're pretty much stuck with what you got. Coming from an iPhone, you should be use to this, but most android users will tell you how handy carrying a spare battery can be. I have the Nexus personally and can say battery life is excellent as long as you know how to tweak your settings. You should have no problem getting through a work day with heave usage, and when you're running on wifi it's even better. Set cpu profiles will help with standby drain as well. Another plus is that the Nexus charges extremely fast. I see you are coming from an iPhone4 and complaining about battery life though, which isn't a good sign. Android is notably worse in the battery department, but that may be due to our larger percentage of power users. I thought the iphone4 battery was excellent when I had it though, but I'd say the Nexus is on par if tweaked correctly.
There are other things to look at like call reception and other factors you will need to really just try out for your self. I'm being honest when I recommend going to a store and handling both phones. The Razr has a great build and sleek design, but it was awkwardly wide in my opinion and it wasn't comfortable in my hand, which is a huge problem. So far the Nexus is the best phone I've ever owned and I've owned my fair share of phones (OG iPhone, OG Droid, Droid 2, Droid 2 Global, Droid X, Thunderbolt, Bionic, Nexus)
I highly recommend the Nexus, and if you're a flasher, I recommend it even more. It has a great community of enthusiasts and devs behind it and it's only going to continue to grow. The dev support is what's going to set the Nexus apart. Devs are going to be releasing roms to keep this phone relevant through out your entire 2-year contract, and probably beyond.