Still, though, series hybrids like the Volt and BMW i3 just use regular inline-4 gas engines taken from their other production lines.
The Volt has basically the same engine as in the Chevy Sonic or Cruze, and the i3 range extender option uses the same engine as their C600 series scooters. Those engines are designed with a quick throttle response and a wide power band to operate over an RPM range sufficient to drive a vehicle through a regular transmission.
I don't doubt that for the same time and money, it was far better for GM and BMW to take advantage of the economies of scale around those products than to design an engine specifically to function as a range extender, but if they really took this as a core function or started from scratch I expect they might select a medium-speed industrial diesel engine instead: something optimized for a particular speed and power output that does that one thing optimally.