If $X^b_a := \int^b_a\lvert x\rangle\langle x \rvert\mathrm{d}x$ is not the identity operator, that means your Hilbert space is $L^2([c,d])$ with $c<a,b<d$ (for $c,d$ possibly infinite). $X^b_a$ is simply the projector onto $L^2([a,b])\subset L^2([c,d])$ since for any $\lvert \psi \rangle$ we have that the wavefunction of $X^b_a\lvert \psi\rangle$ at $x\in[c,d]$ is given by
$$ \langle x\vert X^b_a\vert \psi\rangle = \int^b_a\delta(x'-x)\langle x\vert\psi\rangle\mathrm{d}x$$
which is zero if $x\notin[a,b]$ and just the usual value of the wavefunction $\langle x\vert\psi\rangle$ if $x\in[a,b]$.
As it therefore is the projector onto the $[a,b]$ part of the spectrum of the position operator, its expectation value is the probability to measure the position as being in the interval $[a,b]$.
Since the projector is self-adjoint, you can think about introducing it as an observable and measuring it. It is a very boring observable: It has two eigenvalues, $0$ and $1$, and its eigenvectors are precisely the wavefunctions that vanish on $[a,b]$ (for $0$) respectively those that vanish outside $[a,b]$ (for $1$), where "vanishing" means they are zero except on a zero-measure subset.
Therefore, if you measure it, you either get "0" and the resulting state is the wavefunction you had before with its values on $[a,b]$ zeroed out or you get "1" and the resulting state is the wavefunction restricted to $[a,b]$ (in both cases suitably normalized, of course). The "question" this measurement corresponds to is very simply "Is the particle inside $[a,b]$?".