I'm assuming it's a threadless steerer.
Common practice is to have the steerer - when desired amount of spacers are added - to end about 3-5 mm below the rim of the stem. Gotta leave a little space to ensure the ability to set the headset preload.
Never heard about anyone doing actual testing on how little overlap it'd be possible to get away with.
If it's a straight metal steerer, you can use a quill-type steerer tube extender to get some more overlap.