We study conditions for existence, uniqueness, and invariance of the comprehensive nonlinear valuation equations first introduced in Pallavicini et al.(Funding valuation adjustment: a consistent framework including CVA, DVA, collateral, netting rules and re-hypothecation, 2011, [11]). These equations take the form of semi-linear PDEs and Forward-Backward Stochastic Differential Equations (FBSDEs). After summarizing the cash flows definitions allowing us to extend valuation to credit risk and default closeout, including collateral margining with possible re-hypothecation, and treasury funding costs, we show how such cash flows, when present-valued in an arbitrage-free setting, lead to semi-linear PDEs or more generally to FBSDEs. We provide conditions for existence and uniqueness of such solutions in a classical sense, discussing the role of the hedging strategy. We show an invariance theorem stating that even though we start from a risk-neutral valuation approach based on a locally risk-free bank account growing at a risk-free rate, our final valuation equations do not depend on the risk-free rate. Indeed, our final semi-linear PDE or FBSDEs and their classical solutions depend only on contractual, market or treasury rates and we do not need to proxy the risk-free rate with a real market rate, since it acts as an instrumental variable. The equations' derivations, their numerical solutions, the related XVA valuation adjustments with their overlap, and the invariance result had been analyzed numerically and extended to central clearing and multiple discount curves in a number of previous works, including Brigo and Pallavicini (J. Financ. Eng. 1(1):1-60 (2014)