One of the reason the Black-Scholes can be transformed into the heat equation is that calls and puts have a zero boundary condition on their contingent payoffs.
Define the terminal payoff condition of a call, $C_T$, and put, $P_T$, as:
$C_T = max(0, S_T-K)$
$P_T = max(0, K-S_T)$
But what if the contingent pay-off is not bounded at zero. For example, what if the lower boundary condition is defined arbitrarily as $-K$? The expected value for such a condition would be given as:
$$E[V_t] = E[Max(-K,S_T - K)] $$
Is it possible to use some variation of the (heat) diffusion equation for non-zero boundary conditions?
The intended use case is for valuing corporate liabilities whose cash flows don't have the same sort of conveniently defined boundary conditions as traditional financial options. The economic intuition behind this is to model a rational firm which may continue to operate at a loss until it exercises the option to discontinue operations in order to not lose more money than its overhead, represented here as $K$.
Anyway, I can brute force the expected value by using convolution methods and fast Fourier Transforms, but those methods are computationally expensive. Transformation into a closed form solution would be much more efficient.
Thank you in advance.
Assuming you mean $P_t=S_T$, that you are pricing under the risk neutral measure $\mathbb{Q}$ and introducing a discount factor $e^{-\int_0^T{r(t)dt}}$, your equation can be rewritten $-$ where $\{\mathcal{F}_n\}_{n\geq0}$ is an appropriate filtration:
$$ \begin{align} \mathbb{E}^{\mathbb{Q}}\left[V_T|\mathcal{F}_0\right]=\mathbb{E}_0^{\mathbb{Q}}\left[V_T\right]&=\mathbb{E}_0^{\mathbb{Q}}\left[e^{-\int_0^T{r(t)dt}}\max(-K,S_T-K)\right] \\[12pt] &=\mathbb{E}_0^{\mathbb{Q}}\left[e^{-\int_0^T{r(t)dt}}\left(\max(0,S_T)-K\right)\right] \\[12pt] &=\mathbb{E}_0^{\mathbb{Q}}\left[e^{-\int_0^T{r(t)dt}}\max(0,S_T)\right]-KP(0,T) \\[12pt] &=\mathbb{E}_0^{\mathbb{Q}}\left[e^{-\int_0^T{r(t)dt}}S_T\right]-KP(0,T) \\[12pt] &=S_0-KP(0,T) \end{align} $$
Where $P(0,T)$ is the price of a zero-coupon bond of maturity $T$ $-$ by definition equal to:
$$ P(0,T) = \mathbb{E}_0^{\mathbb{Q}}\left[e^{-\int_0^T{r(t)dt}}\right] $$
If now you have two distinct values $K_1 \not= K_2$:
$$ \mathbb{E}_0^{\mathbb{Q}}\left[V_T\right]=\mathbb{E}_0^{\mathbb{Q}}\left[e^{-\int_0^T{r(t)dt}}\max(-K_1,S_T-K_2)\right] $$
Using equivalent arguments as above, the value can be rewritten:
$$ \mathbb{E}_0^{\mathbb{Q}}\left[V_T\right]=\mathbb{E}_0^{\mathbb{Q}}\left[e^{-\int_0^T{r(t)dt}}\max(0,S_T-(K_2-K_1))\right]-K_1P(0,T) $$
This 2nd risk neutral expectation is simply the price of a European call option of strike $K_2-K_1$ so you can use standard formulas to price it.
If you now introduce time-dependency to your "strike" $K$ $-$ as one of your comments below does $-$, we get:
$$ \begin{align} \mathbb{E}_0^{\mathbb{Q}}\left[V_T\right]&=\mathbb{E}_0^{\mathbb{Q}}\left[e^{-\int_0^T{r(t)dt}}\max(-K_T,S_T-K_T)\right] \\[12pt] &=\mathbb{E}_0^{\mathbb{Q}}\left[e^{-\int_0^T{r(t)dt}}\max(0,S_T)\right]-\mathbb{E}_0^{\mathbb{Q}}\left[e^{-\int_0^T{r(t)dt}}K_T\right] \\[12pt] &=S_0-\mathbb{E}_0^{\mathbb{Q}}\left[e^{-\int_0^T{r(t)dt}}K_T\right] \end{align} $$
Here the price and the complexity of the calculations will depend on the dynamics of $K_t$, but in a Black-Scholes world, assuming a geometric Brownian motion diffusion process for $K_t$ and that this asset is tradeable, we simply get:
$$ \mathbb{E}_0^{\mathbb{Q}}\left[V_T\right]=S_0-K_0 $$
Because the discounted price of any tradeable asset under the risk neutral measure is a martingale.
The takeaway is that the complexity of the solution and the numerical techniques needed if no closed-form exists depend on the setting you specify $-$ i.e. diffusion equation followed by your asset, specification of the interest-rate process, etc. In a Black-Scholes framework, the price of the derivatives above are readily derived.