(Edited after comment-discussion)
The following answer shows that in the continuous case, there exist either no, or infinitely many possible solutions for $C$.
Let $|S|=|T|=n$. Rename the elements of $S $ and $T$ to be $1,...,n$. Then our equations are
$$
\forall \sigma\in S_{n}:\quad \sum_{i=1}^{n} \underbrace{C(i,\sigma(i))}_{:=x_{i,\sigma(i)}}= c_\sigma
$$
, and $x_{i,j}$ are our unknowns.
Let further $P_\sigma$ be the permutation matrix corresponding to $\sigma$. Then we have that
$$
\sum_{i=1}^{n} x_{i,\sigma(i)} =((P_\sigma)_1,...,(P_\sigma)_n)\pmatrix{(x_{1,i})_{i\in[n]}\\\vdots\\ (x_{n,i})_{i\in[n]}}
$$
, where $(P_\sigma)_j$ denotes the $j$-th row of $P_\sigma$ (as a row vector), and $(x_{j,i})_{i\in[n]}$ denote column vectors for all $j\in[n]$.
With this we arrive at the linear equation system
$$
\forall \sigma\in S_{n}:\quad
((P_\sigma)_1,...,(P_\sigma)_n)\pmatrix{(x_{1,i})_{i\in[n]}\\\vdots\\ (x_{n,i})_{i\in[n]}} = c_\sigma\tag{1}
$$
Since we have $n^2$ variables, but the dimension of the space spanned by all permutation matrices only has dimension $(n-1)^2+1$, we arrive at the conclusion that the equation system is underdetermined, so it either has no solutions, or infinitely many (depending on the $c_\sigma$).
So, if our goal is to find a certain solution $C$, then there can't exist such an algorithm.
If we know that there exists a solution $C$, and our goal is merely to find one such $C$, then it suffices to pick $(n-1)^2+1$ linearly independent equations from (1) as a linear equation system, and compute a solution for it. Since we have $n^2$ variables and $(n-1)^2+1$ equations, finding such a solution can be done in time $\mathcal O(n^6)$.
If we don't know whether there exists a solution $C$, the above method still yields a candidate for a solution. But in this case, we'll need to check if a solution exists. This is the case if and only if our solution candidate satisfies all equations in (1), and checking this takes time $\Omega(n!)$.