Doesn't the DC-component (average) of the signal vary wildly depending
if the content is all black (0V-0.3V) or all white (0V-1V)?
Yes it does. So the technique is basically to use a negative peak detector to clamp the sync tip to some known value, then derive the sync tip timing from the clamped tip.
With the timing known, a sample-hold grabs the clamped signal value during the blank interval, and uses this to offset the video portion. The resulting signal has a known value for the blank video, which is itself less than zero intensity (blank is "blacker than black"). Now the clamped video can be offset so that black is at zero, and the rest follows.
The key is to realize that the signal processing chain uses non-linear processing to restore voltage levels on a line-by-line basis.