Combinations of elements from multiple sets with constraints

This could theoretically be done with standard inclusion–exclusion on the $\binom n2$ conditions that the elements be pairwise different (where $n$ is the number of sets being chosen from, in your case $n=4$), but that would be quite cumbersome. It’s easier to apply general Möbius inversion on posets. Here the partially ordered set is the set of partitions of your set of sets, partially ordered by refinement.

That is: Let $\mathcal S=\{A,B,C,D\}$ denote the set of sets, and let $\mathcal P$ denote the set of its partitions. For each partition $p\in\mathcal P$ of $\mathcal S$, we can count the tuples that are constant on each part of the partition. For instance, for $p=\{\{A,C\},\{B,D\}\}$, the identical elements from $A$ and $C$ can be $1$, $2$ or $3$, and the identical elements from $B$ and $D$ can be $1$ or $2$, so there are a total of $3\cdot2=6$ tuples that are constant on the parts of $p$.

Partially order $\mathcal P$ by refinement, where $p\preceq q$ means that $q$ is finer than $p$, that is, each part of $q$ is a subset of a part of $p$; for instance, $\{\{A,C\},\{B,D\}\}\preceq\{\{A\},\{C\},\{B,D\}\}$. Let $g(p)$ count the tuples that are constant on the parts of $p$, and let $f(p)$ count the tuples that are constant on the parts of $p$ but not of any coarser partition. Then we have

$$ g(q)=\sum_{p\preceq q}f(p)\;. $$

We can readily count $g$, and we want to invert the sum by Möbius inversion to get $f(s)$, where $s=\{\{A\},\{B\},\{C\},\{D\}\}$ is the finest partition, the maximal element of $\mathcal P$:

$$ f(s)=\sum_{p\preceq s}g(p)\mu(p,s)\;. $$

The values of the Möbius function $\mu$ that we need are determined by the initial value $\mu(s,s)=1$ and the recurrence

$$ \mu(s,p)=-\sum_{s\preceq q\preceq p}\mu(s,q)\;. $$

The next-coarsest partitions after $s$ are the ones with three parts, of the form $\{\{A,B\},\{C\},\{D\}\}$. There are $6$ of these, one for every pair of sets. You’ve already counted the corresponding values of $g$. As the only finer partition is $s$, we have $\mu(s,p)=-1$ for each of these, so we subtract each of their counts once, as expected.

Then there are two types of partitions with two parts, of the form $\{\{A,B\},\{C,D\}\}$ and of the form $\{\{A,B,C\},\{D\}\}$. There are $3$ of the first type (one for each way to divide the sets into pairs) and $4$ of the second type (one for each set). A partition of the first type is coarser than $2$ of the partitions with three parts, and a partition of the second type is coarser than $3$ of the partitions with three parts, so the Möbius function values $\mu(s,p)$ are $-(1+2\cdot(-1))=1$ and $-(1+3\cdot(-1))=2$, respectively.

Finally, there is one partition with a single part, $\{\{A,B,C,D\}\}$, the minimal element of $\mathcal P$, which is coarser than all other partitions, so the corresponding Möbius function value is $\mu(s,p)=-(1+6\cdot(-1)+3\cdot1+4\cdot2)=-6$.

Counting the values of $g$ as described above yields counts of $8,6,6$ and $9,8,8,8$ for the partitions with two parts of the first and second type, respectively, and a count of $2$ for the partition with a single part.

For example, the values $8$, $6$, $6$ correspond to the partitions $\{\{A,B\},\{C,D\}\}$, $\{\{A,C\},\{B,D\}\}$ and $\{\{A,D\},\{B,C\}\}$, respectively. In the first case, $A$ and $B$ share $4$ elements (all $4$) and $C$ and $D$ share $2$ elements ($1$ and $2$). We can combine these in $4\cdot2=8$ ways to form tuples that are constant on both parts. One example of such a tuple is $(1,1,2,2)$. Analogously, $A$ and $C$ share $3$ elements ($1$, $2$ and $3$) and $B$ and $D$ share $2$ elements ($1$ and $2$), so for the second partition there are $3\cdot2=6$ tuples.

Now by Möbius inversion the desired count of tuples that are not constant on any partition coarser than the finest partition $s$ is

$$ f(s)=192-48-36-32-36-32-32+8+6+6+2(9+8+8+8)-6\cdot2=50\;, $$

in agreement with your result.