Surface groups are known to be the Poincaré duality groups of dimension two since the work of Eckmann, Linnell and Müller. We prove a prosolvable analogue of this result that allows us to show that surface groups are profinitely (and prosolvably) rigid among finitely generated groups that satisfy \({{\,\textrm{cd}\,}}(G)=2\) and \(b_2^{(2)}(G)=0\) . We explore two other consequences. On the one hand, we derive that if u is a surface word of a finitely generated free group F and \(v\in F\) is measure equivalent to u in all finite solvable quotients of F, then u and v belong to the same \({{\,\textrm{Aut}\,}}(F)\) -orbit. Finally, we get a partial result towards Mel’nikov’s surface group conjecture. Let F be a free group of rank \(n\geqslant 3\) and let \(w\in F\) . Suppose that \(G=F/\langle \!\langle w\rangle \!\rangle \) is a residually finite group all of whose finite-index subgroups are one-relator groups. Then G is 2-free. Moreover, we show that if \(H^2(G; \mathbb {Z})\ne 0\) then G must be a surface group.