  Black hole spectroscopy is a clean and powerful tool to test gravity in the
strong-field regime and to probe the nature of compact objects. Next-generation
ground-based detectors, such as the Einstein Telescope and Cosmic Explorer,
will observe thousands of binary black hole mergers with large signal-to-noise
ratios, allowing for accurate measurements of the remnant black hole
quasinormal mode frequencies and damping times. In previous work we developed
an observable-based parametrization of the quasinormal mode spectrum of
spinning black holes beyond general relativity (ParSpec). In this paper we use
this parametrization to ask: can next-generation detectors detect or constrain
deviations from the Kerr spectrum by stacking multiple observations of binary
mergers from astrophysically motivated populations? We focus on two families of
tests: (i) agnostic (null) tests, and (ii) theory-based tests, which make use
of quasinormal frequency calculations in specific modified theories of gravity.
We consider in particular two quadratic gravity theories
(Einstein-scalar-Gauss-Bonnet and dynamical Chern-Simons gravity) and various
effective field theory-based extensions of general relativity. We find that
robust inference of hypothetical corrections to general relativity requires
pushing the slow-rotation expansion to high orders. Even when high-order
expansions are available, ringdown observations alone may not be sufficient to
measure deviations from the Kerr spectrum for theories with dimensionful
coupling constants. This is because the constraints are dominated by "light"
black hole remnants, and only few of them have sufficiently high
signal-to-noise ratio in the ringdown. Black hole spectroscopy with
next-generation detectors may be able to set tight constraints on theories with
dimensionless coupling, as long as we assume prior knowledge of the mass and
spin of the remnant black hole.
