Finite potential well with quantised energy In a finite potential well like that in figure, is the potential constant between $-L/2$ and $L/2$? Since that energy is quantised, if I'm in the second excited state, would the potential still be constant and equal to $0$, so that energy is only kinetic?

 A: The potential is constant by definition. It's independent on your energy state, and it is in fact one of the elements that dictates the behaviour of your system.
A: You have to be careful to distinguish between the potential $V(x)$, which determines the dynamics of the system, and the potential energy of the particle. The total energy of a particle in an energy eigenstate (the ground state or any of the excited states) is constant and well-defined. However, because the wavefunction of the particle is spread out through space, the "potential energy" of the particle is not well-defined. In a finite potential well, part of the wavefunction extends into the region where $V>0$. Therefore, you cannot conclude that the potential energy of the particle is zero. There is a non-zero probability of finding the particle in a region where $V(x)\neq0$. Therefore, if you did an experiment to measure the potential energy of the particle, sometimes you would measure zero, and sometimes you would measure $V_0$. You can calculate the expectation value of the potential energy operator (which is well-defined) using the formula
$$\langle V\rangle=\int_{-\infty}^\infty V(x)|\psi(x)|^2.$$
You will find it is greater than zero.
A: It depends on shape of quantum well. Apart from your mentioned rectangular well where $V_0=\text{const}$ between $-a,a$, it can be other forms/shapes of potential wells where potential ground level is some function $V_0=V_0(x)$. Such as,
triangular well :

or ellipse-like harmonic oscillator quantum well :

Exact expression of $V_0(x)$ may depend on how you will measure quantum well width. Some may it measure at half-maximum voltage level, others at $1 - \frac 1e$ voltage drop level. Anyway, by definition quantum well is just a region surrounding minimum potential energy of particle, so it doesn't have to be rectangular (and thus $V_0$ be $\text{const}$) in general. But in your case-finite square well-, yes it is.
