Nerves (or Erlang’s VM BEAM) is nowhere near small enough to run on ESP32. I think a comparison is not very useful.
If you have an ESP32 you need something like Toit, if you have a Raspberry Pi you might as well run embedded Linux (with Nerves on top).