The answer is Yes for the second question, about $(\exists x)(\forall y)w=1$. Following Christian Remling's idea: If a sentence like $$\exists x(\forall y)(yxy^{-1}x^2y^{-9}\dots=1)$$ holds in all finite groups then it holds in $\mathbb Z/n\mathbb Z$ where it just says (for certain constants $a,b,c,d$) $$ (\exists x)(\forall y)((a-b)x+(c-d)y=0). $$ The only way this can be true is if $c=d$. So *the exponents of $y$ in $w$ add up to 0*. In that case, the sentence is true in all groups because we can take $x=e$, the group identity (called 1 by the OP). It's also Yes on Question 1. If $\forall x\exists y (w=1) $ holds in $\mathbb Z/n\mathbb Z$ then there it says $ ax=by $, i.e., $ b $ divides all $ ax $, so $ b $ divides $ a $. But then in any group given $ x $ we can take $ y=x^{-a/b} $.