Oriented linear $S^2$ bundles over $S^4$ are classified by $\pi_3(SO(3))=\mathbb{Z}$. They all have the same cohomology groups but with different ring structure. The trivial bundle $S^2\times S^4$ has $w_2=0,\ p_1=0$; $\mathbb{CP}^3$ corresponds to the integer 1 and has $w_2=0,\ p_1=-4$.
So my question is whether the total spaces of all those bundles are spin, i.e. $w_2=0$ and what their first Pontryagin classes are.
For $z\in \mathbb{Z}$, let $E_z$ denote the total space of the bundle corresponding to $z$. So, $E_0 = S^2\times S^4$ and $E_1 = \mathbb{C}P^3$. We will show that $w_2(E_z) = 0$ and $p_1(E_z) = -4z$.
Claim 1: $E_z$ is the pull back of $S^2\rightarrow \mathbb{C}P^3\rightarrow S^4$ from a degree $z$ map $S^4\rightarrow S^4$.
Proof: Consider the universal bundle $SO(3)\rightarrow ESO(3)\rightarrow BSO(3)$. Linear $S^2$ bundles over $S^4$ are classified by a homotopy class of map from $S^4$ to $BSO(3)$. In other words, they are classified by $\pi_4(BSO(3))$ (which is canonically isomorphic to $\pi_3(SO(3)) \cong \mathbb{Z}$ as you noted). Also as you noted, $\mathbb{C}P^3$ corresponds to the $z=1$ case. Let $\phi:S^4\rightarrow BSO(3)$ classify $E_1$. In other words, $[\phi]\in\pi_4(BSO(3))\cong \mathbb{Z}$ corresponds to $1$.
Now, if $f:S^4\rightarrow S^4$ is a degree $z$ map, then clearly $[\phi\circ f] = z\in \mathbb{Z}$. Then $E_z = (\phi \circ f)^\ast ESO(3) = f^\ast \phi^\ast ESO(3) = f^\ast \mathbb{C}P^3$. $\square$
Claim 2: $w_2(E_z) = 0$.
Proof: Let $\epsilon$ denote a trivial bundle. Also, let $\pi:E_z\rightarrow S^4$ denote the projection. Finally, let $\xi_z$ denote the vector bundle obtained by filling in the fibers of $E_z$. Then $TE_z\oplus \epsilon \cong \pi^\ast TS^4 \oplus \pi^\ast \xi_z$, according to Lemma 8.2.3 of Geiges' "An introduction to contact topology". Since both $TS^4$ and $\xi_z$ are bundles over $S^4$, the Stiefel-Whitney classes up to $w_3$ all vanish trivially. In particular, $w_2(TE_z) = 0$ by the Whitney sum formula. $\square$
Claim 3: $p_1(E_z) = -4z$.
Proof: Using the same trick as in Claim 2, (and the fact that $p_1(TS^4) = 0$ because its stably parallelizable), we know that $p_1(TE_z) = \pi^\ast p_1(\xi_z)$. Now a Gysin sequence argument shows that $\pi^\ast:H^4(S^4)\cong \mathbb{Z}\rightarrow H^4(E_z)$ is an isomorphism. So, we need only compute $p_1(\xi_z)\in H^4(S^4)$.
By definition, this is obtained by taking the pull back of $p_1\in H^4(BSO(3))$ under the classifying map $f_z\circ \phi$. Since $p_1(\mathbb{C}P^3) = -4$, we know $\phi^\ast(p_1) = -4 \in H^4(S^4)$. So, we have reduced the calculation to understanding $f_z^\ast :H^4(\mathbb{C}P^3)\rightarrow H^4(E_z)$. But in my answer here I show that it is multiplication by $z$. $\square$