Aha, based on a comment to my previous post I now better understand the question at hand. I still stand by what I wrote in my original post, but I now see it is not the best answer for the real question, so let me write my new answer here.
Allow me to first carefully state the question/context I will be addressing:
We are interested in the Wess-Zumino term in four dimensions. This is defined similar to the more well-known WZ term in two dimensions, so let me first repeat the logic. For a given map g:S2→SU(N), one notes that since π2(SU(N))=0 we can consider the gradual/continuous deformation gs where g1=g and g0=1. Note that we can interpret this as a function gs:D3→SU(N), where s denotes the radius of the 3-ball. So we have extended our function such that our original function lives on the boundary. One then defines the WZ term as SWZ[g]=∫D3Tr(g−1sdgs)3 (there is some pre-factor I am ignoring). This is supposed to be a function of g, but we have used the object gs. So for the WZ term to be well-defined, it should be independent of our above choice of gs. Well, it turns out that it is independent up to 2π, so eiSWZ[g] is well-defined. To see this, take gs:D3→SU(N) and ˜gs:D3→SU(N), of course both satisfying g1=˜g1=g. The latter means we can actually glue them together to a function hs:S3→SU(N). We then want to show that ∫S3Tr(h−1sdhs)3 is an integer multiple of 2π. The reason is basically because on a closed manifold one can show that this integral is measuring the topological winding number of the manifold around the target space, in this case π3(SU(N))=Z.
So we see that a WZ term for a map into the group manifold is defined by first extending it to a map on a higher-dimensional manifold, then defining some integral of that map, and to then argue it is independent of the extension we used topological properties of our group. The question is then asking about the four-dimensional case, in particular how the different manifolds used are consistent with each other.
Answer:
Let me first rephrase the `simple' case I described above in a more topological way, since it will help in higher dimension and also mimicks a bit how Witten talks about it. The WZ term is actually defined by a certain three-form ωWZ∈Ω3(SU(N)) on SU(N). One can pull this back under gs to get a three-form on D3, which one can integrate to get SWZ. But in the case of hs, which is defined on the compact manifold S3, there is an alternative nicer viewpoint: to a first approximation, one can intuitively think of the k-th homology group of a manifold as being the equivalence class of all k-dimensional submanifolds, with the equivalence up to cobordism (meaning two submanifolds define the same homology element if they can together form the boundary of a higher-dimensional manifold; for example two points in a space define the same zero-dimensional homology class if there is a line in our space connecting them). So our map hs:S3→SU(N) defines a submanifold/class [S3]h∈H3(SU(N)). Moreover, it turns out our WZ form ωWZ is closed, which in terms of de Rham cohomology means it defines a cohomology element [ωWZ]∈H3(SU(N)). Moreover, by definition cohomology elements eat homology elements, by which I mean one can evaluate [ωWZ]([S3]h). In fact, this is an equivalent way of writing the WZ-term SWZ ! What does this give us? Well, now it is written in a manifestly topological notation. We see our map hs:S3→SU(N) picks out an integer of H3(SU(N))=Z. More exactly, the Wess-Zumino term is normalized by requiring that if we take a map f:S3→SU(N) corresponding to 1∈π3(SU(N)), that then [ωWZ]([S3]f)=1.
So alright, let's now suppose our original space-time is S4, and so we start with a map g:S4→SU(N). Since π4(SU(N))=0, we can use the same logic I just described and get gs:D5→SU(N). Note that our original map g lives on the boundary ∂D5=S4. In ``Global aspects of current algebra'' (1983), Witten defines the WZ term by choosing a particular 5-form ωWZ on SU(N). It's then the same story as above: SWZ=∫D5g∗s(ωWZ) (where `g∗s' means `pulling back under this map'). Similarly, to show this is independent (up to some integer) of the choice of gs, we want to see that ∫S5g∗s(ωWZ) is an integer. But this is again for the same reasons as above: since S5 is a closed manifold it defines a homology element of H5(SU(N)) and since ω is a closed form it defines a cohomology element in H5(SU(N)), such that our integral becomes the topological [ωWZ]([S5]h). Again, the Wess-Zumino term is normalized such that if we take f:S5→SU(N) corresponding to 1∈π5(SU(N)), that [ωWZ]([S5]f)=1.
Similarly we could have started with a spacetime S3×S1 and a map g:S3×S1→SU(N). We can think of S3×S1 as associating a circle to every point in S3. Write the coordinate of S3 as →n and of S1 as ϕ. For a fixed value of →n, think of gradually shrinking our circle to a point, creating the space S3×D2. We can extend our map to gs:S3×D2→SU(N) by gradually trivializing the map g(→n,ϕ) for a fixed value of →n such that at the point of collapse g0(→n)=g(→n,0). Note that this is possible by π1(SU(N))=0. Note that our spacetime again lives on the boundary: ∂(S3×D2)=S3×S1. We again define SWZ=∫S3×D2g∗s(ωWZ). Also, again, to prove it is well-defined we consider the glued map hs:S3×S2→SU(N). Again this is a five-dimensional closed manifold so defines an element of H5(SU(N)) and we can rewrite SWZ=[ωWZ]([S3×S2]h).
But... is it clear that SWZ=[ωWZ]([S3×S2]h) is an integer? We don't have the luxury as before where we could normalize our term such that we get integers, because we have already normalized it such that [ωWZ]([S5]f)=1 (where f corresponded to 1∈π5(SU(N))). In principle it is possible that for example [ωWZ]([M5]i)=12 for some five-dimensional manifold embedded by i:M5→SU(N). Indeed, Witten mentions on p434 of ``Current algebra, baryons and quark confinement'' that there are indeed such examples! But it turns out that this can't happen if M5=S3×S2 :) To see this, we have to prove that if f:S3×S2→SU(N) defines an element [S3×S2]f that we can find a map g:S5×SU(N) such that [S3×S2]f=[S5]g. Now if you scroll up and see how I introduced homology above, you see that all we need to show is that there is a manifold M whose boundary ∂M is S3×S2 and S5 (this is called a cobordism between these two manifolds) and a map k:M→SU(N) such that on the boundary k reduces to f and g. As I was writing this I thought I had an argument for this, but it didn't work out. I am pretty sure there must be a way of seeing it, but it's pretty late here and I should call it a day. I will try and complete the argument soon, but I also welcome any pointers. Witten on p434 implies all you need is π2(SU(3))=0.
So that at least shows things are consistent: the WZ term is well-defined, even if we take our spacetime to be S3×S1. But I feel part of your question is also: can we get different physical phenomena depending on these two spacetimes? And that should indeed be possible: a S3×S1 spacetime allows for non-trivial configurations in the far past (i.e. non-zero global soliton number), whereas a S4 spacetime assumes everything becomes constant in the far past/future. So yes the physics can in principle be different, but the above shows how everything is well-defined in either case. I have tried to clarify the relationship between different kinds of topological information and defining the WZ term. As a quick recap: to define the WZ term starting from two dimensions and spacetime S2, you use π2(SU(N))=0 to extend the map (with the auxiliary space D3). To define the WZ term starting from a S4 spacetime, you use π4(SU(N))=0 to extend the map (with the auxiliary space D5). And if you start from S3×S1 you use π1(SU(N))=0 to get a map on the auxiliary space S3×D2. Moreover we saw how one needs to check that the last two definitions are consistent/well-defined (they are). Lastly there is the comment that in principle the physics can depend on the choice of relevant spacetime.