Is it true, that for any two non-isomorphic finite groups $G$ and $H$ there exists such a group word $w$, that $|V_w(G)| \neq |V_w(H)|$? Here $V_w(G)$ stands for the verbal subgroup of $H$, generated by the group word $w$.
Initially, the question I wanted to ask was: “Is it true, that for any two non-isomorphic finite groups $G$ and $H$ there exist such a one-word generated group variety $\mathfrak{U}$, such that $G$ is in $U$ and $H$ is not?” However, then I found an obvious counterexample: $C_2$ and $C_2 \times C_2$. So, I decided to require a stronger condition.
For the statement of the main question that counterexample already fails. Moreover, if $H$ and $G$ are counterexamples, then they are required to have following properties:
1) They are both non-abelian:
If one of the groups is abelian the other group is not, then their commutator subgroups have different orders. If both tho both are abelian, then by the classification of finite abelian groups they can be decomposed into direct products of primary cyclic groups.
$$G = (C_2^{g_2} \times ... \times C_{2^i}^{g_{2^i}} \times ...) \times ... \times (C_{p_j}^{g_{p_j}} \times ... \times C_{{p_j}^i}^{g_{{p_j}^i}} \times ...) \times ... $$
$$H = (C_2^{h_2} \times ... \times C_{2^i}^{h_{2^i}} \times ...) \times ... \times (C_{p_j}^{h_{p_j}} \times ... \times C_{{p_j}^i}^{h_{{p_j}^i}} \times ...) \times ... $$
where $$g_{{p_j}^i} = \log_p|V_{{p_j}^{i-1}}(G)| - 2\log_p|V_{{p_j}^{i}}(G)| + \log_p|V_{{p_j}^{i+1}}(G)|$$
$$h_{{p_j}^i} = \log_p|V_{{p_j}^{i-1}}(H)| - 2\log_p|V_{{p_j}^{i}}(H)| + \log_p|V_{{p_j}^{i+1}}(H)|$$
It is not hard to see, that if they satisfy the condition, they are isomorphic.
2) They have the same order: $$|G| = |V_x(G)| = |V_x(H)| = |H|$$
3) They have the same exponent: $$exp(G) = min\{n \in \mathbb{N}: |V_{x^n}(G)| = 1\} = min\{n \in \mathbb{N}: |V_{x^n}(H)| = 1\} = exp(H)$$
4) $var(G) = var(H)$:
A group $G$ satisfies an identity $w$ iff $|V_w(G)| = 1$.
5) $\forall w \in F_\infty \text{ } V_w(G) = G \iff V_w(H) = H$
Moreover, if $G$ and $H$ are counterexamples with the least possible order, they have to satisfy the additional condition:
For every group word $w$, if $V_w(G)$ is a non-trivial proper verbal subgroup, then $V_w(G) \cong V_w(H)$ and $\frac{G}{V_w(G)} \cong \frac{H}{V_w(H)}$.
If there is a group word $w$, such that $V_w(G)$ and $V_w(H)$ are non-trivial proper verbal subgroups of the corresponding groups and not isomorphic to each other, then they are the counterexample of lesser order, as $V_{u(x_1, ... , x_m)}(V_{w(x_1, ... , x_n}(G)) = V_{w(u(x_{11}, ... , x_{m1}), ..., u(x_{1n}, ... , x_{mn}))}(G)$.
If for every group word $w$, if $V_w(G)$ is a non-trivial proper verbal subgroup, then $V_w(G) \cong V_w(H)$ and there is a group word $w$, such that $V_w(G)$ and $V_w(H)$ are non-trivial proper subgroups of the corresponding groups and $\frac{G}{V_w(G)}$ and $\frac{H}{V_w(H)}$ are not isomorphic to each other, then $\frac{G}{V_w(G)}$ and $\frac{H}{V_w(H)}$ are a counterexample as $V_u(\frac{G}{V_w(G)}) \cong \frac{V_u(G)}{V_w(G) \cap V_u(G)}$
However, even with all those facts in my hands, I still failed to get the contradiction.