Fundamental conditions that rule gain flatness in Er-doped glass optical amplifiers are investigated using few parameters obtained by drastic simplifications for level positions and widths. The obtained general gain flatness condition for rare-earth-doped glasses contains two parts: a general one valid in any material and a slight modulation of it valid only for glasses when "0-0" transitions are involved. Essentially, the electron-phonon coupling for the considered materials has to be larger than 2/3. In order to exemplify these conditions, they are calculated for fluoride and silicate glasses, which are known to display respectively flat and non-flat gain behavior.