The general framework to handle logical systems in which terms can be undefined is called "free logic". However, free logic has been studied mostly in the context of philosophy, and is conspicuous only in its absence in mathematical logic textbooks. This is because the way we handle things in mathematics is just to rephrase the question to avoid the undefined values, and to use vacuous quantification in other settings to work around them.
In free logic there are several semantics, but all of the ones that people usually consider do give a truth value to "$(\forall x \in \mathbb{R})[ 1/x = 1]$". All the usual semantics would say that it is false because it is false for $x = 2$. I spent a while looking into this a little bit ago, and what I learned is that the usual trend in free logic is to assign a truth value to as many quantified sentences as possible. Of course one could define a semantics in which a quantified statement has no truth value if there is a substitution instance that has no truth value (e.g. "1/0 = 1" has no truth value in free logic because $1/0$ is an undefined term; but $(\forall x \in \mathbb{R})[1/x = 1]$ is nonetheless false in all the usual semantics).
My interest in this came from looking at statements such as "$(\forall X \subseteq \mathbb{R})(\forall z \in X) [ z \leq \sup X]$". My opinion is that this statement is erroneous, and has no truth value, because it has no truth value when we take $X = \emptyset$. However, by looking at some references I realized that all of the usual semantics for free logic make this statement true, because they make $(\forall z \in \emptyset)[z \leq \sup \emptyset]$ true as a vacuous quantification. Nevertheless my personal opinion, as yours may be, is that the formula at the beginning of this paragraph cannot be asserted in ordinary mathematics because to do so implies that $\sup\emptyset$ has to be defined. It would be possible, I believe, to write a short paper developing a semantics for free logic that mirrors this, although I have not spent any significant time on it.
A bit of intuition: Consider the formula
$$∀x∀y((x ≠ y) → ∀z((z = x) ∨ (z = y)))$$
Note that it actually says
For the universe $U$, if any arbitrary objects $x$ and $y$ are different, then any other arbitrary $z$ is either equal to $x$ or $y$.
Then we see that the referred formula will be true in any interpretation which universe $U$ has two (or one too, by vacuity) elements. It will be false otherwise.
A bit of symbolism:
I'm afraid of being pedant, so don't read this if my symbolism may confuse you. First we recall the notions of interpretation of a First Order language. Given a language L, and a L-structure $M$, the domain of $M$ (we shall denote it by $|M|$) can be any set, as long it is non-empy and countable (so as an answer to your question, $\{0,1\}$ is clearly allowable).
Let $M$ be an interpretation such that $M \vDash ∀x∀y((x ≠ y) → ∀z((z = x) ∨ (z = y)))$.
This means that the formula is true in $M$. We state:
$M \vDash ∀x∀y((x ≠ y) → ∀z((z = x) ∨ (z = y)))$ iff $1\leq |M| \leq 2$
1. Let $|M|=1$. The formula is true, since $x ≠ y$ is false for every value of $x$ or $y$.
2. Let $|M|=2$. The formula is true, since $x ≠ y$ is true for every value of $x$ or $y$, but $∀z((z = x) ∨ (z = y)))$ is not false.
2. Let $|M|=k$, where $k\neq 1, k\neq 2$. The formula is false, since $x ≠ y$ is true for every value of $x$ or $y$, but obviously $∀z((z = x) ∨ (z = y)))$ is false (Pigeonhole principle).
Examples of structures:
$\{0,1\}$, $\{0,2\}$, $\{3,5\}$... true
$\{0,1,2\}$, $\{0,2,3\}$, $\{1,2,5\}$... false
Best Answer
The statement $$\exists x\exists y\forall z\;\bigl((x = z) \lor (y = z)\bigr)$$ asserts that there exist elements $x,y$ in the universe such that, for each $z$ in the universe, either $z=x,\;\,$or $z=y,\;\,$or both (i.e., $z$ is equal to one of $x,y$).
Based on that understanding, the statement is true for a given universe if and only if the universe is nonempty and has at most two elements.
If the universe has exactly one element, $a$ say, let $x=y=a$.
If the universe has exactly two elements, $a,b$ say, let $x=a, y = b$.
In both of the above cases, the statement is true, since any $z$ would have to be equal to one of $x,y$ (there's no way $z$ can avoid that).
On the other hand, if the universe has at least $3$ elements, $a,b,c,\;$say, there's no way to choose $x,y$ so that each $z$ is equal to one of $x,y$. If such elements $x,y$ were to exist, the set $\{x,y\}$ would have at most two elements, hence the statement would be false for at least one of the test cases $z=a, z=b, z=c$.
Key point: The order of the quantifiers matters.
For example, if you change the statement to $$\forall z\exists x\exists y\;\bigl((x = z) \lor (y = z)\bigr)$$ the new statement asserts that for each $z\;$in the universe, there exist elements $x,y\;$in the universe such that $x=z,\;$or$\;y=z,\;\,$or both.
But the new statement is true in any universe since, for any choice of $z$, we can simply choose $x=z,\;$and then for $y$, we can choose any element of the universe (e.g., $y=z$).