You should be able to eliminate those borders while maintaining the original (lack of) scaling.
I don't have experience with VGA CRTs, but on my PVM I run resolutions of 2560x240 and 2560x224 depending on the system/game. The large horizontal resolution allows identical pixel widths while filling the entire horizontal space, no matter the horizontal resolution of the source. You can do something similar with a VGA monitor:
https://gist.github.com/Monroe88/dbd3e01252afa5c50690
If you have only 640 horizontal pixels, you'll get uneven scaling unless the source H-resolution is 320 or 640, or else you'll need those black bars. However, since CRTs have effectively unlimited horizontal resolution, you can get perfect horizontal resolution that fills the screen no matter the source.
For the vertical resolution, it shouldn't be a problem, though I have an issue with Retroarch specifically (and I'd like to know how this works for you). I'll repost my post from another forum and hopefully someone can help me out with this issue:
I am however having one problem. For consoles that output 224 vertical lines instead of 240 (like Genesis), I can't find a way to display the image without black bars at the top and bottom of the screen (8 pixels each). I have 2560x240 and 2560x224 resolutions defined for my monitor, and in something like MAME, if a game runs at a native vertical resolution of 224, I simply set my desktop to the 224p resolution, run the game, and it takes up the full screen with 1 to 1 line scaling. However in Retroarch, it does something very odd. Upon booting up a core, it actually changes the way the 224p resolution is displayed in such a way that scrunches up the vertical lines, so that 8 black lines are displayed at the top and bottom. As far as Windows is concerned, the resolution is indeed 224p, and if I exit fullscreen mode, the scrunching persists, and my mouse cursor cannot enter those 8-pixel tall black bars. As soon as I exit Retroarch, the scrunching goes away, and the 224p resolution reaches the top and bottom of the screen again. If I enable windowed fullscreen mode, it actually just treats the screen as 240p (overriding the desktop setting), applying ugly scaling to the picture to make it fill the full screen.
This problem happens whether or not I specifically define video_resolution_x and _y in the .ini file. It's really odd. I should note that because I have a custom viewport of 2560x224 set, the displayed image is identical whether my screen resolution is 240p or 224p; both have the black borders. I can of course remedy this problem by going into my monitor's service menu and changing the vertical stretch, but this is pretty cumbersome, and I'd like to avoid this and have it just work like MAME in this regard. Any help would be appreciated!
edit: Oh also, as a generally useful tip, you can use "integer scaling" and a custom viewport in the Retroarch video settings to ensure that both H and V resolutions are a multiple of the native resolution of the machine in question. Just make sure "configuration per core" is enabled, and know that after checking "integer scaling" it won't automatically apply new viewport numbers; you'll have to set those numbers after checking "integer scaling."