Does Earth's magnetic field become stronger when a solar flare hits? This curiosity arises as follows: when ejecta from a strong solar flare hits Earth, will the Earth somehow counter its impact with a stronger magnetic field. 

Or, earth's magnetic field as limited power strength to resist?
No, but the magnetic dipole of Earth has a field strength that increases with closer distance. On the direct line between Earth and Sun the magnetic field strength is always $B(r) = M/r^3$ where $M$ is the magnetic moment of the terrestrial dipole and $r$ is the distance to the dipole, aka Earth.
When the solar wind conditions change, the boundary between the wind and the terrestrial magnetosphere changes in location, until it finds a new pressure equilibrium.

The approximate location of the boundary shock can be found by equating the ram pressure of the solar win $p_{\rm ram}= \rho u^2$ with the magnetic dipole pressure $p_{\rm dip}=M^2/(2\mu_0 r^6)$, where $\mu_0$ is the vacuum magnetic permittivity. If you solve this for $r$, you will find a closer location $r$ for the shock for stronger conditions, and then checking at which magnetic field strength this occurs via $B(r) = M/r^3$, you'll find that the magnetic field at the shock has of course increased, but only because the shock has moved closer, not because  $M$ has changed.