Let (X,d,μ) be a metric measure space satisfying a Q-doubling condition, Q>1, and an L2-Poincaré inequality. Let L=L+V be a Schrödinger operator on X, where L is a non-negative operator generalized by a Dirichlet form, and V is a non-negative Muckenhoupt weight that satisfies a reverse Hölder condition RHq for some q≥(Q+1)/2. We show that a solution to (L−∂t2)u=0 on X×R+ satisfies the Carleson condition, B(xB,rB)supμ(B(xB,rB))1∫0rB∫B(xB,rB)∣t∇u(x,t)∣2tdμdt<∞, if and only if, u can be represented as the Poisson integral of the Schrödinger operator L with trace in the BMO space associated with L.