The soft version of the question is as follows: suppose I have a linear operator, and I know it is a 'nice' differential operator on its domain minus a singular set of codimension two. Does the operator behave 'nicely'?

Concrete example: Consider the flat torus $T:=\mathbb{R}^n / \mathbb{Z}^n$ (locally looks like $\mathbb{R}^n$ but I don't have to worry about a boundary or compactness). Let $T_{sing}:=\{x \in T: x_1=x_2=0 \mod \mathbb{Z} \}$ a set of codimension 2 and let $T_{in}=T \setminus T_{sing}$ denote the remainder of the space.

Assume $D: L^2(T) \rightarrow L^2(T)$ is a linear operator. Assume that on $T_{in}$ the operator $D$ is a smooth differential operator of degree $2$, that is $D= \sum_{|\alpha|\le 2}a_{\alpha}(x) \partial^{\alpha}$, where $\alpha$ is a multiindex, assume the coefficient functions $a_{\alpha}(x)$ are smooth and bounded on $T_{in}$.

Question: If $D$ is uniformly elliptic on $T_{in}$, that is $-\sum_{|\alpha|=2}a_{\alpha}(x)\xi^{\alpha} \ge c |\xi|^2$, can I conclude that $D$ has discrete spectrum bounded from below?