We continue to barely function

Samuel Johnson (of the dictionary) spent a lot of his life trying to avoid debtor's prison. He's one of the most highly regarded English writers in history but while he lived and worked he struggled to survive. Such is life.
What he would do to avoid debtor's prison is that he would ask for subscriptions to books he hadn't written yet. He frequently failed to finish those books by the time the money ran out, but he got there eventually.
He funded an annotated collection of the complete works of Shakespeare this way.
Shakespeare did make money during his life, but that was less because he wrote plays that it was because he was a partner in his company. In those days authors had no rights to their work – the company owned the plays.
He did have some success as a poet, when the plague had closed London's theatres. He used long-form narrative poems to shill for a patron, and he had those poems printed and they sold well, and he may have made money from that although I'm not sure we can confirm that.