An algorithm exists in principle, at least when the genus is $0$. But it is very difficult unless the degree is small. For example, if the function is supposed to be a polynomial, as in your example, you write the derivative of your polynomial with indefinite coefficients. Then you choose critical values consistent with your data and otherwise arbitrary, and
solve the resulting system. You obtain finitely many polynomials. For each of them you
compute the monodromy of the inverse, this requires only numerical (approximate)
computation, and see which of these finitely many polynomials fits your data. All this assumes that you can solve polynomial systems. But this is the case.
In principle. Such computations have been actually performed for small degrees, and for very special sets of data.

By the way, this does not prove the uniformization theorem, even in the special case
that we consider. The algorithm I described actually uses the uniformization theorem. We know in advance for which sets
of data a polynomial exists. And we know that if it exists than critical values can be
arbitrarily assigned. All this follows from the uniformization theorem.