Note: this answer is only valid for real values. However, the same idea can be used for complex values (assuming that $t \in \mathbb{C}$ as well), by taking $t$ to lie on a line parallel to the real axis through each $x_k$.
Suppose $x \in \mathbb{R}^n$ and $x_1 \le \cdots \le x_n$. Let $\phi_x(t) = \sum_k |x_k-t|$. We note that $\phi_x$ is differentiable on $D=\mathbb{R} \setminus \{x_1,\ldots,x_n\}$, and $\phi_x'(t) = | \{i: x_i < t\}| - | \{i: x_i > t\}| $ for $t \in D$ (here I am using $|\cdot|$ for the cardinality). Note that
$\phi_x'(t) \in \{-n,\ldots,n\}$ and at the points of discontinuity, $\phi_x'$ changes by 2.
Then $\phi_x$ completely specifies $x$. To see this, first note that $\lim_{t \to \infty} \phi_x'(t) = n$, hence we know the number of points $n$.
We note that $\phi_x'$ is non-decreasing. Let $A = \{ \tau : \lim_{t \uparrow \tau} \phi_x'(t) < \lim_{t \downarrow \tau} \phi_x'(t) \}$, and note that $A$ is finite. For $a \in A$, let $n(a) = \frac{1}{2}(\lim_{t \downarrow a} \phi_x'(t) - \lim_{t \uparrow a} \phi_x'(t))$. Then if we let $A = \{ a_1,\ldots,a_k\}$ where $a_i < a_{i+1}$, and define the matrix $P:\mathbb{R}^k \to \mathbb{R}^n$ by $$[P]_{ij} = \begin{cases} 1, & 1 \le i \le n(a_1) \\
1, & 1<j, \ n(a_1)+\cdots +n(a_{j-1})< i \le n(a_1)+\cdots +n(a_{j}) \\ 0, & \text{otherwise,}\end{cases}$$ then $x=Pa$.
It follows from this that if $\phi_x = \phi_y$, where the $x,y$ are “ordered” then $x=y$.
Addendum: The complex case is similar, except that (taking $\phi_x$ as a map $\mathbb{R}^2 \to \mathbb{R}$) $\phi_x'(t) = \sum_k \frac{t-x_k}{|t-x_k|}$,
for $ t \notin D = \mathbb{R}^2 \setminus \{x_1,\ldots,x_n\}$. Then $\phi_x'$ is continuous for $x \notin D$. Furthermore, if we let $n(a) = \frac{1}{2}(\lim_{\delta \downarrow 0} \phi_x'(a+\delta) - \lim_{\delta \downarrow 0} \phi_x'(a-\delta))$ (note that $\delta$ only takes real values), then $n(a)=0$ for $a\in D$, and if $ a \in \{x_1,\ldots,x_n\}$, then $n(a) = | \{ x_i | x_i = a \} | $.
In this case, $\phi_x$ determines the $x_i$ and their multiplicities, but not the order. However, this is sufficient to show that if $\phi_x = \phi_y$, then
$\{x_1,\ldots,x_n\} = \{y_1,\ldots,y_n\}$ (and multiplicities as well, although this was not part of the question).
Note: It would have been simpler to show that $n(a) = \frac{1}{2}(\lim_{\delta \downarrow 0} \phi_x'(a+\delta) - \lim_{\delta \downarrow 0} \phi_x'(a-\delta))$ is defined everywhere and $n(a) = | \{ x_i | x_i = a \} | $.
Then if $\phi_x=\phi_y$, the corresponding '$n$s' must be equal, and the result follows immediately from the fact that $n(a) = | \{ x_i | x_i = a \} | $.