Is a function that integrates to zero against all polynomials constant?

For any real $s > 0$, the series for $e^{-sx}$ is an alternating series for $x > 0$, which gives an error bound in terms of the first neglected term: $$ e^{-x}\left|\sum_{n=0}^{N}(-1)^n\frac{(sx)^n}{n!}-e^{-sx}\right| \le e^{-x}\frac{(sx)^{N+1}}{(N+1)!}. $$ Integrating the right side in $x$ over $[0,\infty)$ and applying integration by parts repeatedly gives $$ \int_{0}^{\infty}e^{-x}\frac{(sx)^{N+1}}{(N+1)!}dx = s^{N+1}\int_{0}^{\infty}e^{-x}dx \rightarrow 0 \mbox{ as } N\rightarrow\infty \mbox{ for } 0 < s < 1. $$ Therefore, by your assumptions, $$ F(s)=\int_0^{\infty}f(x)e^{-sx}dx = \lim_{N\rightarrow\infty}\int_{0}^{\infty}f(x)\sum_{n=0}^{N}\frac{(-sx)^{n}}{n!}dx=0,\;\;\; 0 < s < 1. $$ At this point you can invoke uniqueness theorems about the Laplace transform in order to conclude that $f$ is $0$ a.e... Or you can use Morera's Theorem to show that $F$ is holomorphic for $\Re s > -1$ because (a) it is continuous and (b) integrals over triangles in this right half plane give $0$. Then, because $F$ is holomorphic and vanishes on a non-zero interval of the positive real axis, the identity theorem implies that $F$ is identically $0$ for $\Re s > -1$. Using that, $F(ir)$ is $0$, which is the Fourier transform of $f$, and that proves $f$ is $0$ a.e. by the Plancherel identity for Fourier transforms.