If you are not going to root, hack or modify your phone and want a solid out of the box experience I would say the Razr. My girl has it and has had no problems with with, it works great. Data connection, GPS, screen, build quality all great. Camera isn't that good on either phone though. If you want a phone with a good camera get the Rezound.
The encrypted bootloader on Motoroloa phones make bricking your phone super easy, if you are going to root and install custom roms. There is no manually booting into recovery from a bootloop, you cannot install custom kernels, and roms like cm7 and miui are harder to develop for these encrypted devices. Its a SOB.
I dont have the Nexus, but every Samsung I have owned has been complete junk with broken radios.
I am going back to HTC myself for my next phone. Those have always been the all around best for me.