Regarding black areas, Battle Garegga seems a bit of a mystery, but with Espgaluda it would be expected because MAME doc claims it’s a 224 vertical game.
You can check this by reducing v.active to 224 (and increase v.backporch to compensate).
The difference between x4 and x5 you described sounds like some difference in how your display scales different resolutions.
And regarding generic 4:3, in lx5 mode this uses 2046 as default samplerate. So it is less than 320 optim in x5.
2046 is the same as 256 optim mode at default (341*6). Actually this is a bit too wide, if you want same aspect as x3 and x4 modes, reduce samplerate to 1950.