Let $$\Omega $$
Ω
be a bounded domain in $${{\mathbb {R}}}^N$$
R
N
with $$C^2$$
C
2
boundary and let $$K\subset \partial \Omega $$
K
⊂
∂
Ω
be either a $$C^2$$
C
2
submanifold of the boundary of codimension $$k<N$$
k
<
N
or a point. In this article we study various problems related to the Schrödinger operator $$L_{\mu } =-\Delta - \mu d_K^{-2}$$
L
μ
=
-
Δ
-
μ
d
K
-
2
where $$d_K$$
d
K
denotes the distance to K and $$\mu \le k^2/4$$
μ
≤
k
2
/
4
. We establish parabolic boundary Harnack inequalities as well as related two-sided heat kernel and Green function estimates. We construct the associated Martin kernel and prove existence and uniqueness for the corresponding boundary value problem with data given by measures. To prove our results we introduce among other things a suitable notion of boundary trace. This trace is different from the one used by Marcus and Nguyen (Math Ann 374(1–2):361–394, 2019) thus allowing us to cover the whole range $$\mu \le k^2/4$$
μ
≤
k
2
/
4
.