How does a level shifter shift the DC level of a multi-stage amplifier output to the ground (or zero)?
Q2 is a CC sink = Ie1 = Ic2 from R ratios and Vbe2=0.7

If you set Vout=0 and compute Vbb to satisfy that, then Vout will follow Vin.