I'm confused by the formulas for power gain decibels and voltage gain decibels
Deci-bels always describe a power ratio.  Power of a electric signal is proportional to the square of the voltage, and inversely proportional to its impedance, as you say.

However, lots of times the impedance isn't known and we still want the useful properties of expressing the gain between two signals in dB.  In that case, we make the simplifying assumption that power is just proportional to the square of the voltage, ignoring differences in impedance.

That could be considered cheating in a strict sense, but there are cases where the impedance isn't that relevant and what you care about is the voltage gain.  Or, the impedance is reasonably standardized between the two signal, so that it wouldn't matter even if it was taken into account.  In another case, the impedances are all known to be low enough so that under normal use the voltages won't change due to loading.

Yes, these are simplifying assumptions, and you have to look carefully at what is really being said to decide how dB is being used.  With some experience, you will get used to which context use just the voltage squared, and which use true power delivery capability.