Hi Josh, if in fact your wife is not on the loan, which is the only true "credit account" related item when purchasing a home, then a foreclosure will not affect her credit. However, if your wife was on title to the home at any time, a subsequent foreclosure may show on the derogatory reporting section of her credit report, as foreclosures are a matter of public record that does get reported.
Regarding your statement that your wife signed a document that you were the sole owner, there are two ways that I have seen Title Co's remove a spouse from a purchase: Quitclaim and Interspousal Grant Deed. My understanding is that an interspousal transfer grant deed is the "stronger" of the two as a quitclaim can allow future claims against title based on the removed individual's actions after the fact (confirm all legal subject matter with your lawyer). An interspousal transfer grant deed is used to easily transfer real property between spouses so the property is not reassessed for tax purposes, and/or you need to transfer interests in the property, and/or convert â€œcommunity propertyâ€ into separate property (California is a Community Property state).
If you so desire, email me your address and I will pull a title history to see if your wife ever shows up as an owner.