Example for first question:

$\Delta u=0$, say on the unit disk, with boundary condition $u_{xx}=0$. The kernel is given by linear combinations of $1$, $x$, $y$ and $xy$, so it is four-dimensional.

Example for second question:

ODE problems like $(x^2y')'-y=0$ with Dirichlet conditions $y(1)=y(-1)=0$.