If your startup projects have failed you, you don't think your 401k plus social security are enough, you are within two decades or so of retirement and you are still "just a coder" I know exactly what you should do:
1. Pick a company you don't hate 2. Get hired 3. learn their codebase inside and out 4. DON'T QUIT
Pretty soon you will be the only person around who knows about system "X" and they will be glad to keep you around past 65. My office is filled with COBOL programmers that took this path. Hell, we even recently hired a guy in his 60's, because that's just how old COBOL programmers are.
Alternatively you could get your MBA and go the CTO/VP of engineering route. This seems better to me, (as a backup plan to startup failure).