He wouldn't be debt free, if the house is still in his name but you've got this, slightly unclear so far, agreement between the pair of you, then he's in debt to you.
If he's in debt to me, then every unmarried couple are in debt to each other if they have a joint mortgage. Unless I'm misunderstanding this point.
It's almost like you'd be giving him a mortgage (as you'd be lending him money and sort of securing that on the house) but unlike a mortgage, you're presumably not expecting him to give you any interest but instead want him to give up a pro-rata share of any capital gains (or losses) in the house?
OR are you expecting to get your 45k back even if the house drops in value by 10%?
I would expect the % of property value in the event of a breakup.
I'd deffo look to get that all clear and in writing before hand including how you'd go about agreeing on a valuation on the house now and at some point in future if/when you either sell or (touch wood it doesn't happen something else occurs like a breakup or a death etc.). Like he might get run over by a bus so it's then the executors of an estate you'd be dealing with re: what the house was worth when you invested and what % you're entitled to unless of course, he's leaving it all to you in a will and/or taking out life assurance for the mortgage etc..