The low-frequency dielectric response of hole-doped insulators La_{2}Cu_{1-x}Li_{x}O_{4} and La_{2-x}Sr_{x}NiO_{4} shows a large dielectric constant epsilon ^{} at high temperature and a step-like drop by a factor of 100 at a material-dependent low temperature T_{f}. T_{f} increases with frequency and the dielectric response shows universal scaling in a Cole-Cole plot, suggesting that a charge glass state is realized both in the cuprates and in the nickelates.