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 ≈ 10 4 K in the blue-optical, 2) a smaller amount of Balmer continuum emission in the near-ultraviolet at λ ≤ 3646Å and 3) an apparent pseudo-continuum of blended high-order Balmer lines between λ = 3646Å and λ ≈ 3900Å. These properties are not reproduced by models that employ a typical solar-type flare heating level of ≤ 10 11 erg cm −2 s −1 in non-thermal electrons, and therefore our understanding of these spectra is limited to a phenomenological three-component interpretation. We present a new 1D radiative-hydrodynamic model of an M-dwarf flare from precipitating non-thermal electrons with a large energy flux of 10 13 erg cm −2 s −1 . The simulation produces bright nearultraviolet and optical continuum emission from a dense (n >10 15 cm −3 ), hot (T ≈ 12 000 − 13 500 K) 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 ≈ 10 4 K blackbodylike continuum component and a small Balmer jump ratio result from optically thick Balmer (∞ → n = 2) and Paschen recombination (∞ → n = 3) radiation, and thus the properties of the flux spectrum are caused by blue (λ ≈ 4300Å) light escaping over a larger physical depth range compared to red (λ ≈ 6700Å) and near-ultraviolet (λ ≈ 3500Å) light. To model the near-ultraviolet pseudocontinuum 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.