Shouldn't the earth have an over all small positive net charge? Cosmic rays in the form of light or high energy particles can ionize atoms, when that happens the electron and the positive ion recoils and the electron gets a whole lot more velocity than the positive ion. Meaning the electron had an easier time escaping earth, and the ones that don't will have a lower average density because of higher orbits, of this causes earth to have an over all positive charge, then the electric field grows until this effect is balanced with the electric fields potential, so that the charges are as easily ejected in the form of ions and the form of electrons. Wouldn't this mean that depending on the background ionizing radiation the earth will have a certain equilibrium positive charge?
There are other effects at play. In particular, solar wind provides protons and electrons which can be attracted by bodies with a charge. If the earth were to develop a negative charge, more protons would be attracted to it than electrons, and the charges would neutralize.
In theory there is some equilibrium balance that is not quite perfect. This SE question suggests that the whole of the Earth and atmosphere actually has a very tiny negative charge, on the order of -1C (which is a really small charge, given how big the Earth is)