As explained in the comments, the result is true if $H$ is abelian.
Here is an argument which shows that the result is true in the somewhat orthogonal case where the center of $H$ ishas trivial center [EDIT] and is indecomposable [/EDIT].
Write the epimorphism $G \times G \to H \times H$ as $\begin{pmatrix} a & b \\ c & d \end{pmatrix}$ with $a,b,c,d : G \to H$. Let $A,B,C,D$ be the respective images of $a,b,c,d$ in $H$.
The groups $A$ and $B$ commute elementwise in the sense that $xy=yx$ for every $x \in A$ and $y \in B$. Moreover, they generate $H$ by assumption. So we have an exact sequence
\begin{equation*} 1 \to A \cap B \to A \times B \to H \to 1 \end{equation*}
and similarly for $C,D$. Note that $A \cap B$ commutes with $A$ and $B$, so it must lie in the center of $H$, thus it should be trivial. Therefore $H=A \times B = C \times D$.
Assume for simplicity $H$ indecomposable. Then we must have It follows that $A=\{e\}$ or $B=\{e\}$, which implies thatthus $a$ or $b$ is surjective. In the case $H$ is decomposable, say $H=H_1 \times \cdots \times H_r$ with $H_i$ indecomposable, we may assume $a=(a_1,\ldots,a_r)$ and $b=(b_1,\ldots,b_s)$ with $a_1,\ldots,a_s$ surjective, $b_1=\cdots=b_s=1$, $a_{s+1}=\cdots=a_r=1$ and $b_{s+1},\ldots,b_r$ surjective. Then $g \mapsto a(g) b(g)$ is a morphism and it's surjective since its image contains $H_1 \times \cdots H_s$ and $H_{s+1} \times \cdots H_r$. QED
The same argument also works in some cases where the center of $H$ is not trivial, for example when $H$ is a group of order $p^3$ with $p$ prime.