I don't really like to call this problem the Particle in an Infinite Potential Well for precisely this reason. It invites questions like, "how does a particle behave in a region of infinite potential?" to which the answer is invariably that by infinite potential, we simply mean that the particle cannot access that region of space. My response would then be, "well why didn't you just say that in the first place?"
I prefer to call this system the Free Particle on an Interval. It's a system which consists of a particle which is not under the influence of any potential at all, but whose wavefunction lives in $L^2\big([0,a]\big)$ rather than $L^2(\mathbb R)$. This makes it clear that it doesn't make sense to talk about the particle being outside the well, and sidesteps any (reasonable) questions about what it means for the potential to be infinite everywhere except a small interval.
Now, there is a sense in which the name Particle in an Infinite Potential Well is a very good name. If you treat the perfectly reasonable Particle in a Finite Potential Well, you can find its bound-state energy eigenfunctions (of which there is always at least one). If you take the limit as the potential $V_0$ outside the box goes to infinity, the aforementioned eigenfunctions converge to the energy eigenfunctions of a particle resticted to an interval$^\dagger$. In this sense, "infinite potential well" can be interpreted as the system being a limiting case of a finite potential well as $V_0\rightarrow \infty$.
$^\dagger$As an obligatory side note, the Free Particle on an Interval is defined not only by its Hilbert space $L^2([0,a])$ and the form of its Hamiltonian $-\frac{\hbar^2}{2m}\frac{d^2}{dx^2}$, but also by the domain of its Hamiltonian, which is essentially the twice-differentiable functions $\psi$ such that $\psi(0)=\psi(a)=0$. The boundary conditions are extremely important, but are inserted by hand because we simply choose them to be so.
We could in principle choose the periodic boundary conditions $\psi(0)=\psi(a)$ without setting these values to zero. This would define the Free Particle on a Ring.
However, if we view the Free Particle on an Interval as a limiting case of the finite potential well, then we find that the eigenfunctions of the Hamiltonian are exponentially suppressed outside of the interval $[0,a]$, tending to zero as $V_0\rightarrow \infty$. Therefore, the boundary conditions $\psi(0)=\psi(a)=0$ are a natural choice from this point of view.