We consider the quantum completeness problem, i.e. the problem of confining quantum particles, on a non-complete Riemannian manifold M equipped with a smooth measure ω, possibly degenerate or singular near the metric boundary of M , and in presence of a real-valued potential V ∈ L 2 loc (M ). The main merit of this paper is the identification of an intrinsic quantity, the effective potential V eff , which allows to formulate simple criteria for quantum confinement. Let δ be the distance from the possibly non-compact metric boundary of M . A simplified version of the main result guarantees quantum completeness if V ≥ −cδ 2 far from the metric boundary andclose to the metric boundary.These criteria allow us to: (i) obtain quantum confinement results for measures with degeneracies or singularities near the metric boundary of M ; (ii) generalize the Kalf-Walter-Schmincke-Simon Theorem for strongly singular potentials to the Riemannian setting for any dimension of the singularity; (iii) give the first, to our knowledge, curvature-based criteria for self-adjointness of the Laplace-Beltrami operator; (iv) prove, under mild regularity assumptions, that the Laplace-Beltrami operator in almost-Riemannian geometry is essentially self-adjoint, partially settling a conjecture formulated in [9].