Your definition of distance between sets $A$ and $B$ doesn't work for some metric spaces. Consider two examples.
Let $S = \mathbb{Q}$. Let $A=[0,\sqrt{2}) \cap \mathbb{Q}$ and $B = \{2\}$. Sets $A$ and $B$ are closed bounded subsets of the metric space $S$. However, $\min\{d(a,b): a\in A, b\in B\}$ is not defined (but $\inf\{d(a,b): a\in A, b\in B\} = 2 - \sqrt{2}$).
Now let $S = \ell_1$. Let $e_i$ be the standard basis of $\ell_1$. Let $A = \{e_i: i\in{\mathbb{N}}\}$ and $B = \{(1 - 1/i) e_i: i\in{\mathbb{N}}\}$. Sets $A$ and $B$ are bounded and closed. Again, $\min\{d(a,b): a\in A, b\in B\}$ is not defined (but $\inf\{d(a,b): a\in A, b\in B\} = 0$).
To avoid this problem, let us assume that $A$ and $B$ are compact sets (or, alternatively, that $S$ is a complete metric space, and $A$ and $B$ are totally bounded sets).
To ensure that $d(A,B) = d(\partial A, \partial B)$, it is sufficient to assume that $S$ is a path metric space (of course, it is a sufficient but not a necessary condition). Recall that $S$ is a path metric space if the distance between every pair of points equals the infimum over of the lengths of curves joining the points (see [Gromov “Metric structures for Riemannian and non-Riemannian spaces”]). In particular, all normed spaces are path metric spaces. Also a closed Riemannian manifold equipped with the geodesic metric is a path metric space.
Proof. Suppose that $S$ is a path metric space. Consider compact subsets $A,B \subset S$. We want to prove that $d(A,B) = d(\partial A, \partial B)$. Suppose to the contrary that $d(A,B) < d(\partial A, \partial B)$. Let $a\in A$ and $b\in B$ be such that $d(a,b) = d(A,B)$.
Choose $\varepsilon > 0$ such that $(1 + \varepsilon) d(A,B) < d(\partial A, \partial B)$. Since $S$ is a path metric space, there is a curve $\gamma:[0,1]\to S$ with $\gamma(0) = a$ and $\gamma (1) = b$ of length at most $(1 + \varepsilon) d(A,B)$. This curve cannot intersect both $\partial A$ and $\partial B$, as otherwise the distance between $\partial A$ and $\partial B$ would be at most $(1 + \varepsilon) d(A,B)$. On the other hand, $\gamma(t_A) \in \partial A$ for $t_A = \sup \{t: \gamma(t) \in A\}$ and $\gamma(t_B) \in \partial B$ for $t_B = \inf \{t: \gamma(t) \in B\}$. We get a contradiction. QED
Here is an example when $d(A,B) \neq d(\partial A, \partial B)$. Let $S= [-1,1]\times \{0,1\}$. Define
\begin{align*}
d((x,0),(y,0)) &= d((x,1),(y,1)) = |x-y|;\\
d((x,0),(y,1)) &= |x| + |y| + 1.
\end{align*}
It is easy to verify that $(S, d)$ is a complete metric space. Let $A = [-1,1] \times \{0\}$ and $B = [-1,1] \times \{1\}$. We have, $\partial A = \{-1,1\} \times \{0\}$ and $\partial B = \{-1,1\} \times \{1\}$. Thus
$$d(A,B) = d((0,0), (0,1)) = 1$$
but
$$d(\partial A, \partial B) = d((1,0),(1,1)) = 3.$$
Best Answer
You are misunderstanding the condition.The condition says that every member of $\mathcal{C}$ shall not intersect the closure of the union of the other members, that is much weaker than having a positive distance from (the closure of) that union. This condition is for example satisfied if each member of $\mathcal{C}$ is open, regardless of the distance between the sets. For example, in $\mathbb{R}$ (with the standard topology, induced by $d(x,y) = \lvert x - y\rvert$ or by $d(x,y) = \lvert \arctan x - \arctan y\rvert$ or a lot of other metrics) the collection $\mathcal{C} = \{(n, n+1) : n \in \mathbb{Z}\}$ satisfies the condition, and the distance of each member of $\mathcal{C}$ to the union of the other members is $0$.
If you understand the terminology: Setting $Z = \bigcup \mathcal{C}$ and endowing it with the subspace topology, induced by the restriction $d\lvert_{Z \times Z}$ of the metric on $X$, the condition says that each $A \in \mathcal{C}$ shall be open in $Z$ (which automatically is the case if $A$ is open in $X$).
However, since $B = \operatorname{Cl}\bigl(\bigcup(\mathcal{C}\setminus \{A\})\bigr)$ is a closed set, every point $x \in X\setminus B$ has a positive distance from $B$. And since the condition says $A \cap B = \varnothing$, every $a \in A$ has positive distance from $B$.
Since in that case $\mathcal{C}$ is assumed to be finite, a positive distance from each other member means a positive distance from the union of the other members. Let's say $\mathcal{C} = \{A_1, \dotsc , A_n\}$, for $i \neq j$ define $$\eta_{ij} = \operatorname{dist}(A_i,A_j)$$ and for each $i$ ($1 \leqslant i \leqslant n$) set $\delta_i = \min \{ \eta_{ij} : 1 \leqslant j \leqslant n, j \neq i\}$. Then $$0 < \delta_i = \operatorname{dist}\biggl(A_i, \bigcup \bigl(\mathcal{C}\setminus \{A_i\}\bigr)\biggr) = \operatorname{dist}\biggl(A_i, \operatorname{Cl}\Bigl(\bigcup \bigl(\mathcal{C}\setminus \{A_i\}\bigr)\Bigr)\biggr)$$ for each $i$, and finally $$\delta = \min \{ \delta_i : 1 \leqslant i \leqslant n\} > 0.$$
And thus as a consequence of the finiteness of $\mathcal{C}$ and the condition that any two [distinct] members of $\mathcal{C}$ have a positive distance we obtain that there is a $\delta > 0$ such that
$$\operatorname{dist}\biggl(A, \operatorname{Cl}\Bigl(\bigcup \bigl(\mathcal{C}\setminus \{A\}\bigr)\Bigr)\biggr) \geqslant \delta \tag{$\ast$}$$
for every $A \in \mathcal{C}$. This of course implies $A \cap \operatorname{Cl}\Bigr(\bigcup \bigl(\mathcal{C}\setminus \{A\}\bigr)\Bigr) = \varnothing$, but it is much stronger.
Right, there can be disjoint closed sets in $X$ whose distance is $0$. For example, in $\mathbb{R}^2$ (with the Euclidean metric) consider $A = \{(x,0) : x \in \mathbb{R}\}$ and $B = \{(x,y) : x\cdot y = 1\}$. Let $f\lvert_A \equiv 0$ and $f\lvert_B \equiv 1$. Then $f$ is continuous but not uniformly continuous on $A \cup B$.