Medicaid is likely to ignore any spousal agreements and consider the assets of each spouse when determining eligibility, according to My San Antonio in "Protecting separate assets from Medicaid."
Sometimes a couple will jointly decide to just spend down the assets of the spouse, who may need long-term care, and leave the other spouse with his or her assets. This can complicate things, if one of the spouses might need to go into a nursing home and have Medicaid pay for their care.
There are potentially a couple of ways around this problem. If the couple gets divorced, then the one spouse's assets will not count against the other spouse. Understandably, many people are reluctant to divorce even for getting coverage for a nursing home stay. There is also an income-based program that some people could qualify under, but the rules can be complicated.
An elder law attorney can advise you on your eligibility, if you think that you might need Medicaid to pay for your nursing home stay at some point.
Reference: My San Antonio (May 4, 2018) "Protecting separate assets from Medicaid."