We prove that some Riemannian manifolds with boundary satisfying an explicit integral pinching condition are spherical space forms. More precisely, we show that three-dimensional Riemannian manifolds with totally geodesic boundary, positive scalar curvature and an explicit integral pinching between the L-norm of the scalar curvature and the L-norm of the Ricci tensor are spherical space forms with totally geodesic boundary. Moreover, we prove also that four-dimensional Riemannian manifolds with umbilic boundary, positive Yamabe invariant and an explicit integral pinching between the total integral of the (Q,T )-curvature and the L-norm of the Weyl curvature are spherical space forms with totally geodesic boundary. As a consequence, we show that a certain conformally invariant operator, which plays an important role in Conformal Geometry, is non-negative and has trivial kernel if the Yamabe invariant is positive and verifies a pinching condition together with the total integral of the (Q,T )-curvature. As an application of the latter spectral analysis, we show the existence of conformal metrics with constant Q-curvature, constant T -curvature, and zero mean curvature under the latter assumptions.