A model has been proposed to describe the laser generation of two-dimensional semiconductor films with near-field pumping by quasitrapped modes excited in dielectric metasurfaces. A metastructure consisting of a Si metasurface coated with a MoTe2 film, where narrow-band resonance of a quasitrapped mode is joined with a broad exciton resonance of a two-dimensional material, has been designed. Threshold conditions for generation in the MoTe2 film with pumping by quasitrapped modes have been determined. The possibility of polarization control of the emission of the proposed metastructure has been demonstrated.