I'm going to assume that by "conditions for instrumental variables to work" you mean "instrumental variables is consistent." However, there are other properties to consider, like performance in small samples, etc.
$
\newcommand{\Cov}{\text{Cov}}
$
In this simple case, the IV estimator in sample of size $n$ is
$$
\hat \gamma_2 = \frac{\sum_{i=1}^n (Z_i - \bar Z)(Y_i - \bar Y)}{\sum_{i=1}^n (Z_i - \bar Z)(D_i - \bar D)}.
$$
For the instrumental variables estimator to be consistent, we only need
$$
\text{Cov}(Z, \epsilon_2) = 0 \quad \text{ (instrument exogeneity)} \tag{1}
$$
and
$$
\text{Cov}(Z, D) \neq 0. \quad \text{ (instrument relevance)} \tag{2}
$$
As long as these conditions are satisfied, it doesn't matter if $Z$ is correlated with $\epsilon_1$. The IV estimator will be consistent. To see this, let's analyze the model in terms of populations,
\begin{align}
\Cov(Z,Y) &= \gamma_2 \Cov(Z, D) + \Cov(Z, \epsilon_2),
\end{align}
and solve
$$
\gamma_2 = \frac{\Cov(Z, Y)}{\Cov(Z, D)} - \frac{\Cov(Z, \epsilon_2)}{\Cov(Z, D)}.
$$
If conditions (1) and (2) hold, then $\frac{\Cov(Z, \epsilon_2)}{\Cov(Z, D)} = 0$ and
the IV estimate
$$
\gamma_2 = \frac{\Cov(Z, Y)}{\Cov(Z, D)}
$$
is well-defined. The estimate is consistent since the probability limit is the population analog,
$$
\hat \gamma_2 \overset{p}{\rightarrow} \frac{\Cov(Z, Y)}{\Cov(Z, D)} = \gamma_2.
$$
Note that weak instruments become a problem as soon as we relax the assumption that
$\text{Cov}(Z, \epsilon_2) = 0$ exactly, as you might want to do when analyzing the properties of the estimator in small samples.
So, are there any consequences if $Z$ is correlated with $\epsilon_1$? Well, it means that a regression of $D$ onto $Z$ will give a biased and inconsistent estimate of $\gamma_1$. However, the usual assumption underlying IV is that you don't really care about estimating $\gamma_1$. You want to consistently estimate $\gamma_2$, which you can do as long as assumptions (1) and (2) hold, as shown above.