Tricky, depends on jurisdiction but generally if you know you're going to die and thus have no intention to repay the debt then it's fraud and the thing you buy is technically stolen and you can repossess stolen goods in many jurisdictions. So they (the debt collectors) could come and get the things you gave away. Best way to skirt this is to take out cash from the cards and buy the stuff cash at random places and inform the people you give stuff to keep it on the down low for a while. Even if they suspect it came from you they can't repossess it without conclusive proof which would be hard to get by.
Yeah, but I feel that is the smallest problem if you suddenly start the morning by mass applying to credit cards, spend like a mad man and then drop dead the next day. Remember it's beyond reasonable doubt, else you couldn't ever convict say 1st degree murder because a key difference between that and say manslaughter is that you planned to kill the person. Now if you don't write that down (who would?) it's proven by your actions. Like say buying the murder weapon the day before. Or going out of your way to meet the person, i.e. not somewhere you're normally at. And the crime would be to not plan to repay, not necessarily that you drop dead. Dying could be unintended, say an overdose from partying too hard.
If you acquired a fake lottery ticket, you could make it look like you thought you were going to repay it once you got the payout. That could also at least delay the giftees from asking too many questions. You wouldn't wanna drop dead the very next day either, wouldn't it be better to wait a little bit?
I was still under the premise from the OP, if we're just talking defrauding banks then yeah there are ways to make it work sure. It has been done before almost guaranteed. Most push for a hefty life insurance as well before they cause their own death in a way that can't be conclusively ruled as a suicide.
The problem with the concept is that you kinda do need to die. Else you've just amassed a shit ton of debt. And most don't want to die. And those that do generally aren't in a state of mind to plan it out well enough to work. Not to mention that you still need to have a credit rating good enough that you can get a decent amount of loans / credit card limit to make it worth the effort.