Say that a group has Property X if its pro-$p$-completion is finite for every prime $p$. For instance, every perfect group has Property X.
Is there a finitely generated, residually finite group $G$ such that every finitely generated subgroup of $G$ is either virtually nilpotent, or has Property X (but $G$ is not virtually nilpotent)? Furthermore, is there such $G$ with intermediate growth?
We would like to have examples where not much is known about their word growth.
Motivation: Henry Bradford and I found some lower bound on the word growth for some groups. We are looking for examples of groups for which this will be useful. So we need examples of finitely generated group which have infinitely many subgroups of finite index, but for each prime $p$ only finitely many of $p$-power index. We would like all of their non-virtually-nilpotent finitely generated subgroups to have the same property and we would like to have examples where not much is known about their word growth.
Edit: I changed the condition on the subgroups to subgroups who do not have polynomial word growth to avoid the lower bound $e^{\sqrt{n}}$ that follows from a result of Grigorchuk, see Theorem E.2 in https://arxiv.org/pdf/1512.07044.pdf.
Edit: see On groups without word growth $\succeq\exp(n^{1/2})$ for a refinement of this question.