Semiclassical quantization of electronic states under magnetic field describes not only the Landau level spectrum but also the geometric responses of metals under a magnetic field. However, it is unclear whether this semiclassical idea is valid in dispersionless flat-band systems, in which an infinite number of degenerate semiclassical orbits are allowed. In this talk, I am going to show that the semiclassical quantization rule breaks down for a class of flat bands including singular flat bands and isolated flat bands. The Landau levels of such a flat band develop in the empty region in which no electronic states exist in the absence of a magnetic field. The total energy spread of the Landau levels of flat bands is determined by the quantum geometry of the relevant Bloch states, which is characterized by their Hilbert–Schmidt quantum distance and fidelity tensors. The results indicate that flat band systems are promising platforms for the direct measurement of the quantum geometry of wavefunctions in condensed matter. I will further generalize this idea to the cases of generic quadratic band crossings and discuss the relation between the quantum geometry and anomalous Landau levels in such systems.