Kazuma needs to get an attorney, like pronto. Even without signing the papers if Kyoko's ghost continues to assert that she's married to him and resides in his primary residence for at least a year there's a real risk that he'd end up in a legally binding common law ghost marriage anyway. I personally know three people that this has happened to.
Remember folks, if you move into a new place and think it's haunted, don't just contact an exorcist: book a consultation with a lawyer. People are all too often blindsided by a tragically late discovery of their legal obligations concerning begrudgingly deceased roommates.