In this work, we study the contributions of the intermediate bottomoniumlike $Z_b$ states and the bottom meson loops in the heavy quark spin flip transitions $Upsilon(4S) to h_b(1P,2P) pi^+pi^-$. Depending on the constructive or destructive interferences between the $Z_b$-exchange and the bottom meson loops mechanisms, we predict two possible branching ratios for each process: BR$_{Upsilon(4S) to h_b(1P)pi^+pi^-}simeqbig(1.2^{+0.8}_{-0.4}times10^{-6}big)$ or $big( 0.5^{+0.5}_{-0.2}times10^{-6}big)$, and BR$_{Upsilon(4S) to h_b(2P)pi^+pi^-}simeq big(7.1^{+1.7}_{-1.1}times10^{-10}big)$ or $big( 2.4^{+0.2}_{-0.1}times10^{-10}big)$. The bottom meson loops contribution is found to be much larger than the $Z_b$-exchange contribution in the $Upsilon(4S) to h_b(1P) pipi$ transitions, while it can not produce decay rates comparable to the heavy quark spin conserved $Upsilon(4S) to Upsilon(1S,2S) pipi$ processes. We also predict the branch fractions of $psi(3S,4S) to h_c(1P)pi^+pi^-$ contributed from the charm meson loops.