Can you reveal a hidden Zhonyas at a battlefield to prevent a unit at base from dying from Public Execution?
Yes. A hidden Zhonya's Hourglass at a battlefield can be revealed in reaction to Public Execution to save a friendly unit at base from dying.
Public Execution is a spell on the chain, so you have a window to react before it resolves. A hidden card gains Reaction while facedown (Rule 811.1.b), so you can play it for [0] at that time. Zhonya's replacement effect doesn't target a unit and isn't a play ability, so the Hidden targeting restriction that would limit it to its own battlefield never applies — it saves the next friendly unit that would die anywhere, including base (FAQ #1806). And if the saved unit is already at base, the "recall it" instruction is simply ignored; the death is still replaced (FAQ #7310).
One catch: if the unit dying is your only unit on that battlefield, don't wait past the cleanup — once you lose control of the battlefield, the hidden Zhonya's gets trashed (Rule 107.3.d). Reveal it while the spell is still on the chain.