Below now is a proof that for sufficiently generic $z$, $b_1(Y(z))=n-1$.

First we show $b_1(Y(z))\geq n-1$.

Let $d=(d_1,d_2..,d_{n-1}): Y(z)\to({\mathbb C}^*)^{n-1}$.
One can explicitly lift the loops in $H_1(({\mathbb C}^*)^{n-1})$ as follows. Fix $i$ between $1$ and $n-1$. Let $e(t)=exp(2\pi \sqrt{-1} t)$ and $$B(t):=\left(\begin{array}{cc} e(t) & 1\\\ e(t)(z_i+z_{i+1}-e(t))-z_iz_{i+1} & z_i+z_{i+1}-e(t) \end{array}\right).$$ Then the characteristic polynomial of $B(t)$ is $(\lambda-z_i)(\lambda-z_{i+1})$. Form an $n\times n$ matrix $A(t)$ as having $z_1,\dots,z_{i-1}$
on the main diagonal, then $B(t)$, then $z_{i+2},\dots,z_{n}$ and zero everywhere else. This matrix has the property that $A(t)\in Y(z)$ (as we assumed generic z) and $d_j(A(t))=z_1\cdot\dots\cdot z_j$ unless $j=i$ when $d_i(A(t))=e(t)z_1\cdot\dots\cdot z_{i-1}$. Thus $A(t)$ is a loop in $Y(z)$ covering
the $i$th generator of $H_1(({\mathbb C}^*)^{n-1})$.

Thus we find that $d_*:H_1(Y(z))\to H_1(({\mathbb C}^*)^{n-1})$ is surjective so $b_1(Y(z))\geq n-1$.

To argue that $b_1\leq n-1$ we first show that the divisors $D_i:=d_i^{-1}(0)$ are irreducible on $X(z)$ for sufficiently generic $z$. We note that
$D_i$ is irreducible in $M_{nxn}$ which can be easily seen over a finite field by counting points on $D_i$. This implies that for a sufficiently
generic $z$ the divisor $D_i$ is irreducible on $X(z)$. When $z_i\neq z_j$ for $i\neq j$ we see that $X(z)$ fibers over the full flag variety with
contractible fibers, so it is simply connected. From the homology Gysin sequence we get that removing an irreducible divisor from a smooth variety can increase
$b_1$ by at most one. By induction we can conclude that $b_1(Y(z))\leq n-1$.

As an example take $n=2$. Here we are removing a copy of ${\mathbb C}^*$ from $X(z)$ an affine line bundle over ${\mathbb P}^1$. This will have Betti numbers $b_1=1$ and $b_2=2$ with weights $q,q,q^2$ respectively, to give Serre-polynomial $q^2+1$. We will have the map
$d=d_1:Y(z) \to {\mathbb C}^{*}$.
The fibers of this map will generically be a ${\mathbb C}^{*}$ and will have two singular fibers, which will give the non-trivial fundamental group. The point is that one can lift the loop generating $\pi_1({\mathbb C}^*)$ as generically $d_1$ is a fibration with connected fibers.