This is probably not a new problem. I am taking a course on Linear Operators and we started talking about inner-product spaces and their cantor completions which confused me quite a bit.
While using semigroup methods to analyze a PDE, books often write the domain of differential operators using Hilbert-spaces.
Consider the heat equation, $$ \frac{\partial u}{\partial t} (x,t) = \frac{\partial^2u}{\partial x^2} (x,t), \quad x\in(0,1), t> 0 \\ u(0,t)=0, \quad u(1,t) =0. $$ The above equation is equivalently written as $$\dot{z}(t) = Az(t)$$ where $Ah:= \frac{d^2h}{dx^2}$ and $D(A) = \{h \in L_2(0,1)\mid h, \frac{dh}{dx} ~\text{are absolutely continuous,} \frac{d^2h}{dx^2}\in L_2(0,1) ~\text{and}~ h(0)=0 =h(1)\}.$
$L_2(0,1)$ is a Hilbert space with standard $L_2$-inner product and I presume is the cantor completion of $C(0,1)$ like I was taught in class. Let $W_2^k(0,1)$ be the Sobolev space with $k$ $L_2$-bounded derivatives.
1) Is $D(A)$ a Hilbert space?
2) What does $f\notin D(A)$ mean? The elements of $D(A)$ seem to be equivalence classes of functions which are equal under $L_2$-norm. Let $f$ be a function that does not satisfy boundary conditions but $f= g$ almost everywhere. Futher, let $g$ satisfy the boundary conditions. Then is $f\in D(A)$ or $f\notin D(A)$?
3) Why do people use Hilbert spaces when talking about solution of PDEs? Why not use functions that are continuous, for example $C^2(0,1)$? Is it because $C^2(0,1)$ is not complete with respect to $L_2$-norm? Then why not use $C^2(0,1)$ with $sup$-norm?
$D(A)$ is not a Hilbert space. Observe that it is dense in $L^2$ since it includes smooth functions with bounded support which are dense. To be a Hilbert subspace of $L^2$ it would have to be closed and hence be all of $L^2$ which is not the case.
To be in the domain your functions have to be continuous so being in the domain is not defined up to equivalence. The $f$ in your example would not be in the domain.
The use of Hilbert spaces in PDE is due to the fact that you get weak formulations in complete spaces where existence is easier to establish. Once you know some solution exists (an is hopefully unique) you have to work the extra mile to show that they are actually more regular for more regular data etc.