A qualitative model describing the ground state and the mechanism of superconducting pairing in Cu- and Fe-based high-temperature superconductors (HTSCs) is suggested. In this model, doping by localized charges (as well as physical or chemical pressure) is supposed to be responsible for transition of Cu- and Fe-based HTSC to new ground state common for both HTSC classes where specific mechanism of superconductivity takes place. The resulting HTSC ground state is strongly correlated insulator with not fully filled exciton-electronic band, where the incoherent electron transport is impossible but coherent superconducting transport is possible because the band is not fully occupied. It is shown also that such electronic system is inherently predisposed to superconductive pairing because each pair of nearest cations acts as a two-atom negative-U center. The nature of Fermi arcs and mechanism of pseudogap are considered. It is shown that both of these features result from d-wave pairing and therefore have to be observed only in cuprates. We believe that the considered ground state is common for various families of HTSCs including cuprates, pnictides, selenides, bismutates and probably some other.