I would guess that a simple VGA to DVI converter simply syncs to the VGA pixel clock, samples the analogue colours, and outputs the digitally encoded values with the same timings.
From a quick look, the oscillator in this machine's schematic runs at 16 MHz. I assume that the pixel clock is derived from this. The DVI specification has a minimum pixel clock of 25 MHz so you couldn't produce a valid DVI stream from this without buffering the pixels and retiming the output in summer way. Well, I suppose since the pixel clock isn't explicit on the VGA cable you could have an imaginary clock which is higher by doubling pixels horizontally.
Ultimately though, success probably varies depending on the converter and the display used. There are quite a lot of standard VESA modes and you can often get away with generating something close-ish to spec.
For more exotic video signals you can use devices like the RGBtoHDMI: https://github.com/hoglet67/RGBtoHDMI
It decodes the input signal into a framebuffer and uses the Raspberry Pi's video core to output the result.
* HDMI is, broadly speaking, a proprietary extension of DVI. You can feed DVI signals though an HDMI connector and it will display anyway.