  We prove an asymptotic formula for the second moment of the
$\mathrm{GL}(n)\times\mathrm{GL}(n+1)$ Rankin--Selberg central $L$-values
$L(1/2,\Pi\otimes\pi)$, where $\pi$ is a fixed cuspidal representation of
$\mathrm{GL}(n)$ that is tempered and unramified at every place, while $\Pi$
varies over a family of automorphic representations of $\mathrm{PGL}(n+1)$
ordered by (archimedean or non-archimedean) conductor. As another application
of our method, we prove the existence of infinitely many cuspidal
representations $\Pi$ of $\mathrm{PGL}(n+1)$ such that $L(1/2,\Pi\otimes\pi_1)$
and $L(1/2,\Pi\otimes\pi_2)$ do not vanish simultaneously where $\pi_1$ and
$\pi_2$ are cuspidal representations of $\mathrm{GL}(n)$ that are unramified
and tempered at every place and have trivial central characters.
