Monte Carlo simulations within the primitive model of calcium-mediated adsorption of linear and comb polyelectrolytes onto like-charged surfaces are described, focusing on the effect of calcium and polyion concentrations as well as on the ion pairing between polymers and calcium ions. We use a combination of Monte Carlo simulations and experimental data from titration and calcium binding to quantify the ion pairing. The polymer adsorption is shown to occur as a result of surface overcharging by Ca(2+) and ion pairing between charged monomers and Ca(2+). In agreement with experimental observations, the simulations predict that the polymer adsorption isotherm goes through a maximum as the calcium or the polymer concentration is increased. The non-Langmuir isotherms are rationalized in terms of charge-charge correlations.