I have the following stochastic process
$$ d\ln Y_t = -k\ln Y_tdt+ \sigma dW_t $$
which has as solution
$$ \ln Y_T = \ln Y_0e^{-kT} + \int^T_0 \sigma e^{-k(T-s)}dW_s $$
When I look at the expectation of $Y_t$ I have
$$ E[Y_T] = e^{E[\ln Y_T] + \frac{1}{2}V[\ln Y_T]} $$
I want the process to be compensated so that $\frac{1}{2}V[\ln Y_T]$ drops from $E[Y_T]$
I know that
$$ V[\ln Y_T] = \frac{\sigma^2}{2k}(1-e^{-2kT}) $$
Is there a way determine what factor needs to be subtracted from the drift of $d\ln Y_t$ such that $E[Y_T]=e^{E[\ln Y_T]}$?
It is correct that $$\tag{1} \ln Y_T=e^{-kT}\ln Y_0+\int_0^T\sigma e^{-k(T-s)}\,dW_s $$ is the solution to $$\tag{2} d(\ln Y_t)=-k\ln Y_t\,dt+\sigma\,dW_t\,. $$ Let's write $X_t=\ln Y_t$ so that $$\tag{3} dX_t=-kX_t\,dt+\sigma\,dW_t\,. $$ Applying Ito to $Y_t=e^{X_t}$ gives $$\tag{4} dY_t=-k\,Y_t\,X_t\,dt+\sigma\,Y_t\,dW_t+\frac12\sigma^2Y_t\,dt\,. $$ This is often written as $$\tag{5} \frac{dY_t}{Y_t}=-k\,\ln Y_t\,dt+\sigma\,dW_t+\frac12\sigma^2\,dt\, $$ and is a special case of the Black-Karaskinski interest rate model in mathematical finance. Comparing (2) and (5) shows that $d\ln Y_t$ is not $dY_t/Y_t$ as in ordinary calculus.
To get $\mathbb E[Y_t]$ we use the following facts:
From (1) we see that $X_T$ is normally distributed with expectation $$\tag{6} e^{-kT}\ln Y_0=\ln\big((Y_0)^{e^{-kT}}\big) $$ and that $Y_T=e^{X_T}$ is of the form $$\tag{7} Y_T=(Y_0)^{e^{-kT}}\,e^Z $$
where $Z$ is the mean zero normal random variable given by the $dW$-term in (1).
The variance of this $Z$-term is $$\tag{8} V=\int_0^T\sigma^2 e^{-2k(T-s)}\,ds=\sigma^2e^{-2kT}\frac{e^{2kT}-1}{2k}=\sigma^2\frac{1-e^{-2kT}}{2k}\,. $$
The expectation of $e^{Z}$ for any $Z\sim N(0,V)$ is $$\tag{9} \mathbb E[e^Z]=e^{V/2}\, $$ (the proof of this is elementary).
Altogether we have $$\tag{10} \boxed{\quad\phantom{\Bigg|}\mathbb E[Y_T]=(Y_0)^{e^{-kT}}e^{V/2}\quad} $$ with the variance $V$ from (8).
To address the question made in the comments how to modify (2) so that $$\tag{11} \mathbb E[Y_T]=(Y_0)^{e^{-kT}} $$ holds. This should be easy. Obviously,
with $$\tag{12} U_t:=Y_t\,e^{-V_t/2}\,,\quad\text{ with } \quad V_t=\sigma^2\frac{1-e^{-2kt}}{2k} $$ has the desired expectation. The SDE that is solved by $U_t$ is found from Ito's integration by parts formula: $$\tag{13} dU_t=e^{-V_t/2}\,dY_t-\tfrac12Y_t\,e^{-V_t/2}\,dV_t=U_t\,\frac{dY_t}{Y_t}-\tfrac12 U_t\,dV_t\,. $$ Using (5) this becomes \begin{align}\tag{14} dU_t=U_t\Big(-k\,\ln Y_t\,dt+\sigma\,dW_t+\tfrac12\sigma^2\,dt-\tfrac12\,dV_t\Big)\,. \end{align} Replacing $\ln Y_t$ by $\ln U_t+\tfrac{V_t}{2}$ we see that this becomes an SDE for $U_t\,.$