Two layers, two different problems
A lemon square is a shortbread base carrying a set lemon topping. The base is specified elsewhere on this site: one part sugar, two parts butter, three parts flour, and no binder of any kind. This page is about the layer on top, and about a mistake that is easy to make from the rest of this site’s own material.
The register records lemon at pH 2.00–2.60, the most acidic fruit in it, with high pectin and set group 1, the group that sets without help. Lemon is the fruit the preserving pages keep recommending as the correction for fruits that will not set.
None of that is what sets a lemon square. A lemon topping is a curd, and a curd sets on egg. The acid is doing something else entirely, and so is the pectin.
A protein set, not a pectin set
A jam sets when pectin chains link into a network, which needs acid and a high sugar concentration to happen. A curd sets when egg proteins coagulate and thicken the mixture around them. Those are unrelated mechanisms with unrelated failure modes, and the same fruit can be involved in both without the two having anything to do with each other.
What the lemon is actually doing in a curd is flavour, and one structural job: acid affects how readily egg proteins coagulate. But the set belongs to the egg. Adding more lemon to a curd that has not set does not fix it. It thins it and pushes it further from setting, which is the exact opposite of the correction that works on a loose jam.
This is the same mechanism family as the pastry creams, where the base is milk + egg + sugar + starch, cooked and the thing that sets it is the starch. The full family, and what each member adds, is at crème pâtissière. The preserving side, where pectin and acid are the whole story, is at preserves.
One consequence worth knowing about acid and egg
There is a note in the cream dataset that applies directly here: adding an acidic ingredient to a starch-set cream before it has set degrades it, which is why acid goes in at the end. A curd is a different set, but the general point survives: acid and setting agents interact, and the order they meet in matters.
What is not established here is any quantity. Nothing consulted for this page specifies a ratio of egg to juice to sugar for a lemon curd, so none is given. The mechanism is the content of this page; the proportions are not something to invent.
And the base underneath
The shortbread base has the same vulnerability it has everywhere: no binder, so nothing to resist a wet layer. A curd is wet when it goes on and sets as it bakes, which is a gentler proposition than raw fruit but not a free one. The reason lemon squares conventionally use a pre-baked base is this and not tradition.
Lemon’s own entry, with its sources, is in the register.
Questions about lemon squares
What makes a lemon topping set?
Egg. It is a curd, and a curd sets when egg proteins coagulate, not on pectin and acid the way a jam does, even though lemon is one of the highest-pectin and most acidic fruits in the register.
My lemon topping did not set. Should I add more lemon?
No, and this is where reasoning from jam goes wrong. More acid thins a curd and pushes it further from setting. Adding acid is the correction for a loose JAM, not for a loose curd.
Why is the shortbread base baked first?
Because shortbread has no egg and no liquid binder, so it has nothing to resist a wet layer with. A curd is wet going on, and pre-baking the base is what keeps it from absorbing that.
Is lemon curd the same as lemon jam?
No. They are different setting mechanisms entirely. A jam is a pectin network needing acid and sugar concentration; a curd is coagulated egg protein. The same fruit can be in both without the mechanisms having anything in common.
What is the right ratio of egg to lemon in a curd?
Not established here. Nothing consulted for this page specifies one, so no proportions are given rather than invented ones. The mechanism is what this page can establish.