It is well-known that for any $\varepsilon>0$ we have $\tau(n)<n^{\varepsilon}$ for all $n \ge C(\varepsilon)$.
Hence $g$ must be constant.
Now suppose that $f$ is non-constant. Then it is well-known that there are infinitely many primes dividing one of the values $f(x)$, and indeed by CRT we then find values of $x$ such that $f(x)$ has as many prime factors as we want, in particular more than $g(x)$ (since $g$ is constant). Contradiction!
Hence both $f$ and $g$ must be constant and hence the solutions are $(f,g)=(c,\tau(c))$ where $c \in \mathbb{N}$ is arbitrary.