A mortgage needs to be granted by an owner of the property. If the wife isn't on title, she can't use that property to secure a mortgage.
A lender could, in theory, accept a mortgage from just one of two or more owners of real estate, but this is never done because foreclosure would grant only an undivided partial interest to the foreclosing lender which is a litigation mess and insufficient to meet commercial and bank regulatory standards for adequate security for a loan.
But it sounds like the girlfriend would be the sole owner of record at the time of the proposed transaction.
A downpayment typically is required by lending regulations to be an unqualified gift or asset of the borrower, which is certainly possible between an unmarried boyfriend and girlfriend, so it wouldn't truly be money laundering, and they aren't married at the time the loan is entered into, so it would probably pass muster.
The transaction would probably survive a form over substance attack because the transaction would have economic substance, providing the girlfriend with property that would be hers without qualification if the couple broke up, and would be her separate property since it was property owned prior to marriage in states with a community property styled marital property regime.
(The one possible attack on the gift would be as a "fraudulent transfer" to avoid the boyfriend's creditors, if he was insolvent when the gift was made, which the question does not suggest is a factor in this transaction.)
The reason that this isn't more common is that usually the benefits of having both incomes considered in the underwriting of a mortgage in terms of the amount of funds that could be lent and the interest rates that the couple would be eligible for provides more benefit to the couple than the benefits that a single lower earning member of the couple could obtain as a sole loan applicant under special low income earning mortgage programs.