This is something which I suspect is written up in introductory books on mathematical physics if I knew where to look. Suppose I have some parameters $t_1$, ..., $t_k$ ranging over a neighborhood in $\mathbb{R}^k$. I also have $k$ matrix-valued functions of the $t$'s: $H_1(t_1, \ldots, t_k)$, ... $H_k(t_1, \ldots, t_k)$. These obey both $$[H_i, H_j]=0 \quad (\ast)$$ and $$[\partial_i+H_i, \partial_j+H_j] =0 \quad (\dagger).$$ For those who don't like the language of connections, we can expand $(\dagger)$ as $\partial H_i/\partial t_j - \partial H_j/\partial t_i + [H_i, H_j]=0$ or, in the presence of $(\ast)$, as $$\frac{\partial H_i}{\partial t_j} = \frac{\partial H_j}{\partial t_i}.$$

Equation $(\ast)$ tells us that, assuming the $H_i$ are individually diagonalizable, we can find $u(t)$ a simultaneous eigenvector for all the $H_i$: $$H_i(t) u(t) = \lambda_i(t) u(t). \quad (\ast\ast)$$

Equation $(\dagger)$ tells us that the vector-valued PDE $$\frac{\partial v}{\partial t_i} + H_i v=0 \quad (\dagger \dagger)$$ will have a unique solution $v(t_1, t_2, \ldots, t_n)$ for any initial value.

I'm pretty sure there is supposed to be a relation between the solutions to $(\ast \ast)$ and $(\dagger \dagger)$. What is the right statement, and what is the keyword to read about this situation?

Motivation: I'm trying to work through the papers of Varchenko, Scherbak and others on the KZ equation. I think it would really clear my head to just see this scenario described abstractly without all the details of which operators they are thinking about.

$\def\mg{\mathfrak{gl}_n}$ Edit to spell out the relation. Let $V_1$, $V_2$, ..., $V_n$ be representations of $\mg$. So $U(\mg)^{\otimes n}$ acts on $V_1 \otimes V_2 \otimes \cdots \otimes V_n$. Let $\Omega \in U(\mg) \otimes U(\mg)$ be the Casimir. (Note: The element I learned to call the Casimir was a central element $c$ in $U(g)$. In terms of that element, $\Omega = \Delta(c) - c \otimes 1 - 1 \otimes c$.) Let $\Omega_{ij}$ be $\Omega$ acting in positions $i$ and $j$.

For generic parameters $z_1$, ..., $z_n$, define $H_i = \sum_{j \neq i} \Omega_{ij}/(z_i-z_j)$. Then, as I understand it, the KZ equation is $(\partial_i + H_i) v(z_1, \ldots, z_n)=0$, where $v$ is a function valued in $V_1 \otimes V_2 \otimes \cdots \otimes V_n$. The $H_i$'s obey both $(\ast)$ and $(\dagger)$ (a nice exercise). And people seem to be very interested in solving both $(\ast \ast)$ "diagonalizing the action of the Gaudin subalgebra" and $(\dagger \dagger)$ "solving the KZ equation". So I was hoping to understand how they relate, and why.