Conditions under which the preimage of a submanifold in nontrivial in homology

A sufficient condition with $\mathbf{Q}$ coefficients should be that the fiber $F$ has non-vanising Euler characteristic.

Consider the Gysin map (aka as fiber integraion) $$\pi^{!} = \int_{\pi}\colon H^{\ast}(M;\mathbf{Q}) \to H^{\ast-k}(N;\mathbf{Q});$$ then $\langle \alpha , \pi^{-1}[S]\rangle = \langle \pi^{!} \alpha, [S]\rangle$ for $\alpha \in H^{p+k}(M)$.

So if we can ensure that the RHS is non-zero, it follows that $\pi^{-1}[S] \neq 0$.

But this is the case if $\chi(M) \neq 0$ as with $T_{\pi}$ the vertical tangent bundle of $\pi$, the fact that $\pi^{!}$ is a $\text{H}^{\ast}(N)$-module homomorphism implies that $$\pi^!(e(T_{\pi})\pi^{\ast}(\alpha)) = \pi^!(e(T_{\pi}))\alpha = \chi(F)\alpha,$$ so $\pi^!$ is (rationally) surjective in this case.


As pointed out by Nicolas Tholozan in the comments, the map $\pi^{-1}:H_p(N)\to H_{p+k}(M)$ which sends $[S\subset N]$ to $[\pi^{-1}(S)\subset M]$ is Poincaré dual to the map $\pi^*:H^{n-p}(N)\to H^{n-p}(M)$ induced by $\pi$ on cohomology. (Here I'm assuming $M$ and $N$ are both oriented and using integral coefficients.)

So you're really asking for conditions under which the induced map in cohomology is injective. One easy example is when $\pi$ admits a section $\sigma:N\to M$, in which case $\operatorname{Id}_{H^*(N)}=(\pi\circ \sigma)^*=\sigma^*\pi^*$.