(abridged) The heating mechanism at high densities during M dwarf flares is poorly understood. Spectra of M dwarf flares in the optical and near-ultraviolet wavelength regimes have revealed three continuum components during the impulsive phase: 1) an energetically dominant blackbody component with a color temperature of T $sim$ 10,000 K in the blue-optical, 2) a smaller amount of Balmer continuum emission in the near-ultraviolet at lambda $<$ 3646 Angstroms and 3) an apparent pseudo-continuum of blended high-order Balmer lines. These properties are not reproduced by models that employ a typical solar-type flare heating level in nonthermal electrons, and therefore our understanding of these spectra is limited to a phenomenological interpretation. We present a new 1D radiative-hydrodynamic model of an M dwarf flare from precipitating nonthermal electrons with a large energy flux of $10^{13}$ erg cm$^{-2}$ s$^{-1}$. The simulation produces bright continuum emission from a dense, hot chromospheric condensation. For the first time, the observed color temperature and Balmer jump ratio are produced self-consistently in a radiative-hydrodynamic flare model. We find that a T $sim$ 10,000 K blackbody-like continuum component and a small Balmer jump ratio result from optically thick Balmer and Paschen recombination radiation, and thus the properties of the flux spectrum are caused by blue light escaping over a larger physical depth range compared to red and near-ultraviolet light. To model the near-ultraviolet pseudo-continuum previously attributed to overlapping Balmer lines, we include the extra Balmer continuum opacity from Landau-Zener transitions that result from merged, high order energy levels of hydrogen in a dense, partially ionized atmosphere. This reveals a new diagnostic of ambient charge density in the densest regions of the atmosphere that are heated during dMe and solar flares.