There is considerable evidence, based on large Nc chiral dynamics, holographic QCD, and Monte Carlo studies, that the QCD vacuum is permeated by discrete quasivacua separated by domain walls across which the local value of the topological θ parameter jumps by ±2π. This scenario is realized in a 2D U(1) gauge theory, the CPN-1 sigma model, where a pointlike charge is a domain wall, and θ describes the background electric flux and the polarization of charged pairs in the vacuum. The transition between discrete θ vacua occurs via the transport of integer units of charge between the two spatial boundaries of the domain. We show that this screening process, and the role of θ as an order parameter describing electric polarization, are naturally formulated in terms of Bloch wave eigenstates of the Dirac Hamiltonian in the background gauge field. This formulation is similar to the Berry phase description of electric polarization and quantized charge transport in topological insulators. The Bloch waves are quasiperiodic superpositions of localized Dirac zero modes and the charge transport takes place coherently via topological charge-induced spectral flow. The adiabatic spectral parameter becomes the Bloch wave momentum, which defines a Berry connection around the Brillouin zone of the zero mode band. It describes the local polarization of vacuum pairs, analogous to its role in topological insulator theory. In 4D Yang-Mills theory, the θ domain walls are 2 + 1-dimensional Chern-Simons membranes, and the θ parameter describes the local polarization of brane-antibrane pairs. The topological description of polarization in 2D U(1) gauge theory generalizes to membrane polarization in 4D QCD by exploiting a relationship between the Berry connection and the gauge cohomology structure encoded in the descent equations of 4D Yang-Mills theory. [ABSTRACT FROM AUTHOR]