Your question is impossible to answer in full generality. There are, however, some interesting special cases. I shall focus on your motivating example (I think, I have written about this on many occasions, but cannot recall the exact sources at the moment).
If $\mathbb{C}$ is a (finitely complete, locally small) regular category, then you may construct a category $\mathit{Rel}(\mathbb{C})$ of canonical internal relations in $\mathbb{C}$. Moreover, $\mathit{Rel}(\mathbb{C})$ has a 2-categorical structure induced by the natural ordering of monomorphisms, and $\mathbb{C}$ is equivalent to the (2-)subcategory of $\mathit{Rel}(\mathbb{C})$ consisting of morphisms that have right adjoint.
On the other hand, the inclusion:
$$J \colon \mathbb{C} \rightarrow \mathit{Rel}(\mathbb{C})$$
has a right adjoint:
$$P \colon \mathit{Rel}(\mathbb{C}) \rightarrow \mathbb{C}$$
iff $\mathbb{C}$ is an elementary topos. Indeed, one may easily verify, that $P$ has to be the internal power functor:
$$\hom_{\mathit{Rel}(\mathbb{C})}(A, B) \approx \hom_\mathbb{C}(A, P(B))$$
More generally, if $p$ is a regular fibration, then under some mild conditions, $p$ has a generic object iff the canonical embedding:
$$J \colon \mathit{Map}(\mathit{Rel}(p)) \rightarrow \mathit{Rel}(p)$$
has a right adjoint, where $\mathit{Rel}(p)$ is the category of $p$-internal relations, and $\mathit{Map}(\mathit{Rel}(p))$ is the subcategory of $\mathit{Rel}(p)$ consitiong of morphisms that have right adjoints.
The link with the previous example appears, when we consider for $p$ the canonical subobject fibration $\mathit{sub}_\mathbb{C}$ of a regular category $\mathbb{C}$ (the canonical subobject fibration of a regular category is regular, and the generic object of a subobject fibration corresponds to the subobject classifier of the category). Another interesting case, is when instead of a subobject fibration, we consider a fibration of regular subobjects --- which leads to the definition of a quasitopos.
Another view of the above generalization is to consider an allegory $\mathbb{A}$. The subcategory $\mathit{Map}(\mathbb{A})$ of $\mathbb{A}$ consisting of maps that have right adjoints is called the category of maps in $\mathbb{A}$. An allegory $\mathbb{A}$ is a "power allegory" iff the canonical inclusion:
$$J \colon \mathit{Map}(\mathbb{A}) \rightarrow \mathbb{A}$$
has right adjoint $P$.
As you may see, your question for mere 2-posetal categories (i.e. $\hom(X, Y)$ is a poset for every $X, Y$) of relations is highly non-trivial.
In some sense, the concept of proarrow equipment (pointed by Tim in his comment) is a 2-categorification of the concept of an allegory. Category $\mathbf{Cat}$ can be reconstructed, up to Cauchy completion (one should not expect more by categorical methods, because $\mathbf{Prof}$ does not distinguish between a category and its Cauchy completion --- i.e. they are equivalent in $\mathbf{Prof}$), from $\mathbf{Prof}$ by taking profunctors that have right adjoints. The inclusion:
$$J \colon \mathbf{Cat}_\mathit{CC} \rightarrow \mathbf{Prof}$$
does not have right adjoint due to the size issues. The same is true for the inclusion:
$$J \colon \mathbf{Cat}_\mathit{CC}(\mathbb{C}) \rightarrow \mathbf{Prof}(\mathbb{C})$$
of Cauchy complete $\mathbb{C}$-internal categories to $\mathbb{C}$-internal profunctors, for any non-trivial category $\mathbb{C}$.