How would that imbalance actually manifest itself in the real world? Does that mean that if for every 10^36 protons the sun had 10^36 + 1 electrons and if the Earth for every 10^36 electrons had 10^36 + 1 protons, then that would knock the Earth out of orbit? At first glance it seems ridiculous but considering the fact that the Earth has 10^50 protons that means that the Earth would have, I think, 10^14 extra protons than electrons, but even 10^14 electrons is hardly a lot considering that a mole is 10^23. My math must be off somehow.

Try it yourself. Calculate the gravitational force between the sun and earth. Then calculate the electric force assuming a surplus of protons of 10^{-36} times the actual number on the sun and earth, and the electric force assuming a proton surplus of 10^{-18}. Which one is closer?

For a more precise value, use 8.998 x 10^{-19} for the "surplus proton" ratio.

the issue is, that two protons alone in free space will have a [itex]1/r^2[/itex] gravitational force that is attractive and another [itex]1/r^2[/itex] electrostatic force that is repulsive. since they are both [itex]1/r^2[/itex], it doesn't matter what distance the protons are from each other (at least in this classical setting). so which force is stronger? the attractive gravitational force (that depends on the masses of the two protons) or the repulsive electrostatic force (that depends on the charges of the two protons)? and by how much?

I'm pretty sure the EM force would matter in your above example. What I'm worried about though is how much of an imbalance of electrons over protons you need on the Earth and Sun before the Earth gets forced out of orbit, provided the Earth has 10^50 protons and the Sun 10^57 protons.

Since were on the topic of gravity how does the sun's gravity prevent it from blowing up into space? Because if its energy comes from nuclear fusion wouldn't the pressure from this reaction push the particles away?

The sun is held in perfect equilibrium. Gravity wants to crush it to a point and the pressure from the fusion wants to push it outward. The outward force of fusion and the inward force of gravity are perfectly balanced and all of this is done without teleology.