This is equivalent to fixing the total degree of the irreducible factors (not counting multiplicity) of a polynomial; that is, if $f(x) = \prod f_i(x)^{m_i}$ is the irreducible factorization over $\mathbb{F}_q$, then the number of linear factors of $f(x)$ over $\overline{\mathbb{F}_q}$ is $\sum \deg f_i$. You can write a generating function for this but it's not very nice. First, recall that the Euler product for the zeta function of $\mathbb{F}_q[t]$ takes the form
$$\frac{1}{1 - qt} = \prod_{n \ge 1} \left( \frac{1}{1 - t^n} \right)^{M(q, n)}$$
where
$$M(q, n) = \frac{1}{n} \sum_{d \mid n} \mu(d) q^{\frac{n}{d}}$$
is the number of monic irreducible polynomials of degree $n$ over $\mathbb{F}_q$; this is the cyclotomic identity. To modify this product so that it also counts the total degree of the irreducible factors we add a second variable $z$ and replace $\frac{1}{1 - t^n}$ (the generating function corresponding to the powers of a fixed monic irreducible polynomial of degree $n$) with
$$1 + z^n (t^n + t^{2n} + \dots) = 1 + \frac{z^n t^n}{1 - t^n}$$
which gives us a modified generating function
$$\boxed{ F(z, t) = \prod_{n \ge 0} \left( 1 + \frac{z^n t^n}{1 - t^n} \right)^{M(q, n)} }.$$
The coefficient of $z^m t^n$ is the number of monic polynomials of degree $n$ over $\mathbb{F}_q$ with $m$ distinct roots over $\overline{\mathbb{F}_q}$.
This is not terribly nice but it could be worse. For example if you wanted to compute the expected value of $m$ you could do it by taking the logarithmic derivative in $z$.