Assuming $a,d\neq0$, Factor out $a$ and $d$, introducing $b',c',e',f'$ so I don't have to write fractions:
$$y=f(x)=\frac{a}{d}\frac{x^2+b'x+c'}{x^2+e'x+f'}=\frac{a}{d}\left(1+\frac{(b'-e')x+(c'-f')}{x^2+e'x+f'}\right)$$
So what you are looking for is the range of $\frac{(b'-e')x+(c'-f')}{x^2+e'x+f'}$ to be $\mathbb{R}$.
This is impossible if the denominator has no real zeros, because in that case the curve has no vertical asymptotes, is continuous over all of $\mathbb{R}$, and has $y=0$ as a horizontal asymptote. So the denominator has zeros, and we may consider $\frac{(b'-e')x+(c'-f')}{(x-r)(x-s)}$ where maybe $r=s$.
Assume $r\neq s$. If the numerator is not identically $0$, then this function definitely has at least one vertical asymptote of degree $1$, and a horizontal asymptote at $y=0$. There is an issue of whether the function achieves the output of $0$. It does if and only if $b'\neq e'$ and the root of the numerator, $\frac{f'-c'}{b'-e'}$, is neither $r$ nor $s$. Now, if the function achieves the output of $0$, it achieves all outputs when you consider the possible arrangements of the two degree-one vertical asymptotes.
If $r=s$, then there are two cases, and both fail
- The numerator has a root and it is $r$. But then we are looking at the reciprocal of a linear function and such things never have all of $\mathbb{R}$ as their range.
- Otherwise, there is a lone vertical asymptote of degree $2$ with both adjacent arms either pointing up or pointing down. Since the horizontal asymptote is still $y=0$, either arbitrarily high positive outputs or arbitrarily high negative outputs are missed.
So in summary, all assuming $a,d\neq0$, you must have
$$\begin{align}
b'&\neq e'&e'^2&>4f'&\frac{f'-c'}{b'-e'}&\neq r,s\\
\iff b'&\neq e'&e'^2&>4f'&\frac{f'-c'}{b'-e'}&\neq \frac{-e'\pm\sqrt{e'^2-4f'}}{2}\\
\iff \frac{b}{a}&\neq \frac{e}{d}&\frac{e^2}{d^2}&>4\frac{f}{d}&\frac{\frac{f}{d}-\frac{c}{a}}{\frac{b}{a}-\frac{e}{d}}&\neq \frac{-\frac{e}{d}\pm\sqrt{\frac{e^2}{d^2}-4\frac{f}{d}}}{2}\\
\iff bd&\neq ae&e^2&>4df&\frac{af-cd}{bd-ae}&\neq \frac{-e\pm\sqrt{e^2-4df}}{2d}\\
\iff bd&\neq ae&e^2&>4df&2d(af-cd)&\neq (bd-ae)\left[-e\pm\sqrt{e^2-4df}\right]
\end{align}$$
I believe the last of these three conditions is equivalent to:
$$(af-cd)^2\neq (ae-bd)(bf-ce)$$
I found this by isolating the radical, squaring, and condensing like terms and factoring what was left. It's possible I made an error during all that.