So if the price is the same....
Here are my thoughts. I would look at the connection time first. If it's too tight at SFO or EWR, it would be too stressful for me.
Next, I look at arrival time at LHR. I would prefer arriving at LHR at the earlier time.
Last, I look at the aircraft selected for the transatlantic flight. If United uses a 757-200 from EWR, the economy seat could be more cramped than if United uses a 777, 767-400, Airbus 340 or Airbus 330 from SFO. A bigger aircraft might be used more often from SFO than EWR because of the distance unless the EWR-LHR route is so popular, United picks its large aircraft for that route to accommodate demand.
To compare comfort levels in the economy cabin on transatlantic flights, go to www.seatguru.com and plug in the flight # and date. You will get specs about the seat info plus user comments. The website also gives you info about the seats so if you can select your seat, you can find out, for example, if the window seat in which you are interested in fact HAS a window as opposed to the seating arrangement being a little off kilter and you're left without a window. You can find out if the seat you want reclines fully or is blocked. That kind of detail. Always keep in mind that United could swap aircraft last minute.
Hope this is helpful.
One other thing that just occurred to me as I come back to this thread. WEATHER. EWR can have snow or be caught up in the last of the hurricanes for the year in November.