To have any hope of doing it, it would need to be either a Verizon or Sprint (CDMA) Galaxy Nexus, model i515. It also appears that if you can get the phone moved that LTE will not work. The GSM Nexus, model i9250, will not work on MetroPCS.
A bad ESN means that the phone has been flagged as being "stolen"; likely either stolen from the owner or the owner is way behind on their contract payments, to the point the cell provider wants to repossess the phone. The ESN is like the serial number that the phone uses to identify itself with the network, so a bad ESN prevents the phone from being used on any cell network.
So, if you were to get a Sprint or Verizon Nexus, first you would need either Sprint or Verizon (or the previous owner) to get the phone unlocked (meaning you can use it on any cell network). After that, you would need to update a bit of the software on the phone so that it would recognize and connect to MetroPCS's towers. You would also need to call MetroPCS and get them to add the phones ESN to their network. There are ways to use the ESN from another phone already on Metro's network, though it is questionable if this process is legal -- and it is definitely illegal if the ESN on the Galaxy Nexus is bad. Doing a quick look, I've not been able to find instructions on how to update the software on the Galaxy Nexus for Metro.