It is known that in a topologically finitely-generated profinite group, every subgroup of finite index is open. (See this paper.)
If $G$ is a finitely-generated residually finite group, then the profinite completion $\hat{G}$ contains $G$ as a dense subgroup, and is therefore topologically finitely generated. If $F$ is a finite-index subgroup of $\hat{G}$, it follows that $F$ is open, so every coset of $F$ contains elements from $G$, and therefore $F \cap G$ is a finite-index subgroup of $G$ with the same index. This defines an isomorphism between the the lattice of finite-index subgroups of $\hat{G}$ and the lattice of finite-index subgroups of $G$.
As long as $G$ and $H$ are finitely generated, this gives a rather strong invariant that can be used to distinguish $\hat{G}$ from $\hat{H}$. Specifically, $\hat{G}$ and $\hat{H}$ can only be isomorphic if the lattices of finite-index subgroups of $G$ and $H$ are isomorphic. Moreover, the isomorphism between these lattices must preserve the permutation action on the cosets of each finitely-generated subgroup. In particular, the lattices of finite-index normal subgroups of $G$ and $H$ must also be isomorphic, in a way that preserves the isomorphism types of the finite quotient groups.