Not weakened at all!
In PA and ZFC (and a wide class of other f-o theories), every defining formula is equivalent to one with no closed subformula. Let's start with ZFC. Suppose $\varphi(x)$ is a defining formula, with $x$ free; now let $z$ be any variable not appearing anywhere in $\varphi$, and for each subformula $\psi$ of $\varphi$, define a new formula $\psi^z(z)$ (with all the same free variables as $\psi$, plus $z$) by:
- if $\psi$ is an atomic formula, take $\psi^z\ :=\ \psi \land (z=z)$;
- if $\psi = \top$, take $\psi^z\ :=\ (z=z)$
- if $\psi = \bot$, take $\psi^z\ :=\ \forall z'.\ z \in z'$
- if $\psi = \psi_1 \land \psi_2$, then take $\psi^z\ :=\ \psi_1^z \land \psi_2^z$
…and so on: all the remaining cases (non-nullary connectives and quantifiers) just commute with $(-)^z$, same as $\land$. Anyway, we've defined these new versions of all subformulas; by induction, they all have $z$ free, have no closed subformulas, and are equivalent to the original versions; so up at the top we apply it to our original formula, and have $\varphi^z(z,x)$; now $\forall z.\ \varphi^z (z,x)$ is equivalent to $\varphi(x)$ and has no closed subformula.
Now, this relied on the fact that ZFC has (in most presentations) no closed terms (indeed, no terms except variables), for the atomic formula case to work: in PA, for instance, $0=0$ gets bumped up to $0=0 \land z=z$, which still has a closed subformula. So for eg PA, we have to work a bit harder at defining that case:
- for $\psi$ an atomic formula $R(t_1,\ldots,t_n)$, take $\psi^z\ :=\ \exists w.\ [w = t_1\ \land\ R(w,\ldots,t_n)\ \land\ z=z]$.
This now makes it all work again! But, this relied on all basic relations $R$ taking at least one argument. In any language with this property, we're good. The one thing we can't generally deal with is theories with nullary relation symbols, aka propositional constants — although we can sometimes still handle them like we handled $\top$ and $\bot$ in $ZFC$.
(Actually, I'm not quite sure what you mean by “how would ZFC and PA be weakened if we changed the definition of a defining formula” – since I don't know axiomatisations of those theories that involve this term. But the standard axiomatisation of ZFC does involve functions (in the replacement axiom), which are just defining formulas $f(x,y)$ with an extra free variable $y$, so I guess what you have in mind might be something like strengthening the definition of function allowed in there? But I think the above construction should answer the question, in any case!)