How should logical quantifiers be understood if the domain of discourse is not specified? Let $P$ be a predicate. The expression $\forall x:P(x)$ seems to have two different meanings, depending on the context:

*

*If the domain of discourse $D$ is clear from context, then the statement "$\forall x:P(x)$" should actually be read as an abbreviation of "$\forall x\in D:P(x)$". For instance, in real analysis the statement $\forall x:x^2\ge0$ would be understood as an abbreviation of $\forall x\in\mathbb R:x^2\ge0$.

*In set theory, it seems that $\forall x:P(x)$ means "for any set $x$, $P(x)$ is true". For instance, the axiom of extensionality is written as $\forall x:\forall y:\forall z:(z\in x\iff z\in y)\implies x=y$.

I don't fully understand the meaning of $\forall x:P(x)$ in the context of set theory. Naïvely, the statement $\forall x:P(x)$ seems to be an abbreviation of $\forall x\in \mathbf{U}:P(x)$, where $\mathbf{U}$ is the universal set. However, the "universal set" is not actually a meaningful concept in standard formulations of set theory, and so this interpretation is clearly wrong. So how should the statement $\forall x:P(x)$ actually be interpreted?
 A: Actually, there is nothing wrong with understanding "$∀x ( Q(x) )$" in a foundational set theory to mean "$∀x{∈}U\ ( \ Q(x) \ )$" where $U$ is the type of all objects (i.e. $U$ denotes the entire intended domain). $U$ does not have to be a set. In pure ZFC, $U$ is not an object, because otherwise we get a contradiction. $U$ is commonly called a class. In extensions of ZFC that can reason about classes as objects, such as NBG or MK, we have two sorts, one for "sets" and one for "classes", and $U$ is still not a set, even though it is now an object.
Typically "$∀x{\in}S\ ( \ Q(x) \ )$" can be treated as a short-form for "$∀x\ ( \ x∈S ⇒ Q(x) \ )$", and "$x∈U$" simply reduces to "true". Note that the "$\in$" here does not require any set theory in a strict sense, because $S$ can just be a sort (in many-sorted FOL). However, it is convenient to use the same symbol as for set membership because there is no danger of ambiguity. After all, in NBG and MK we literally have $E ∈ \{ t : Q(t) \} ⇔ Q(E)$ where "$\{ t : Q(t) \}$" is the class notation.
In fact, this usage of quantifying over classes is extremely common in higher set theory, such as "$∀k{∈}ORD$" where $ORD$ is the class of ordinals, which is (as explained above) perfectly fine even in pure ZFC.
A: The question in the title is. . .

How should logical quantifiers be understood if the domain of discourse is not specified?

And the answer is that you don't understand them unless they're specified. It's possible the domain of discourse is clear from context, but that has much more to do human communication than with the mathematical content.
In the context of set theory, the domain of discourse is that of all sets.
This brings to light the following apparent issue.

Naïvely, the statement $\forall x:P(x)$ seems to be an abbreviation of $\forall x\in \mathbf{U}:P(x)$, where $\mathbf{U}$ is the universal set. However, the "universal set" is not actually a meaningful concept in standard formulations of set theory, and so this interpretation is clearly wrong.

And the question. . .

So how should the statement $\forall x:P(x)$ actually be interpreted?

As mentioned in the comments, your interpretation "for any set $x$, $P(x)$ is true" is correct. And this fine (or at least as fine as it can be). In this setting, the quantifiers are not formal entities. They're part of the metalanguage, just like English. We just enrinch the natural language (in this case English) with some extra symbols to facilitate communication. The $\in$ symbol is different, however, because in set theory it has a formal meaning.
There are contexts (e.g. predicate calculus) in which the quantifiers are formal symbols, in which they're not part of the metalanguage. In these contexts, the quantifiers are part of formal language just as much as $\in$ is in set theory. There are also formation rules that determine what formulas are legal, and in such systems a formula like $\forall x P(x)$ (it can be a little bit different, it may require some more parentheses, but it's something like this) is legal and that's that.
