Thin films of superconducting magnesium diboride are required for several applications. However, their fabrication can be challenging, particularly on amorphous or polycrystalline substrates when the film growth is inherently non-epitaxial. Here, we describe the fabrication and properties of 50-600-nm-thick MgB2 films on glassy carbon substrates, through optimizing parameters of Mg vapor annealing of sputter-deposited amorphous B films. Our results reveal a critical role of both the initial B film thickness and the temperature-time profile on the microstructure, elemental composition, and superconducting properties of the resultant films. We discuss the challenges related to the chemical reactivity of ultrathin B films, the control of nucleation and growth of MgB2 crystallites, and the formation of boron carbides at the film-substrate interface. We demonstrate the existence of a window of process parameters resulting in smooth superconducting films with thicknesses down to 50 nm. This work was performed under the auspices of the U.S. DOE by LLNL under Contract DE-AC52-07NA27344.