I was in a similar situation.

I was suffering from long-term unemployment after a layoff, and my experience was so specialized that no company really wanted me (and if a company didn't want experience, why not just hire someone fresh out of college?).

I wound up somehow managing to land a job at a year-old startup that was still in early stages. I was making barely more than what I made at my last job in pure cash ($45k vs. $42k), when I'd been underpaid at my last job, and I received no insurance whatsoever. Still, I was grateful because I needed a job: the long-term unemployment had destroyed my mental health, plunged me five figures in debt, left me barely able to afford to live, and I was about out of extended unemployment (I found out I'd exhausted it the day after I accepted the offer -- and I got this job in early 2012 when extended unemployment was still a thing). It was this job or suicide, basically.

When I joined, I was one of the only employees who wasn't Director-level or higher. I stayed way longer than I should. Ended up working there almost 3 years. The company was about to kick off the pilot program for their first big product when I left (we had another product before that, but it wasn't suitable for mass production and was discontinued long before the replacement was ready). The owner/CEO was insistent on keeping control of the company, so he never sought VC funding. Instead, we went through an endless cycle of constantly demoing our product to small-time investors. It was a constant scramble of getting things ready for the next demo.

The company stayed small, raises were almost nonexistent (I somehow made it to $47k about a year in after I was rewarded for a huge flash of inspiration where I designed and wrote the product's infrastructure in like two days, but that was it, and I never got another), we never got insurance, and after a certain point we began hiring all new people as contractors to skirt under the federal 15-employee limit (which affects mandatory insurance and EEO matters).

Management was terrible. My boss had no management experience and simply didn't know how to manage anything multiple people worked on. He was a brilliant engineer himself, and everything he wrote solo was a well-designed work of art, but he had no clue how to manage other people. Code breakage issues were constant. The co-head developer was utterly terrible at both design and coding, and my boss (the official head of development -- though he treated the co-head as an equal) insisted he could do no wrong and got irrationally angry whenever his friend's design or coding ability was questioned. My and a co-worker's complaints went unanswered, and said co-worker eventually snapped and dropped his notice on our boss' desk without anything lined up when he realized the problems would never be resolved. Another co-worker left for similar reasons. Neither were replaced. Also, my boss couldn't handle stress, and he'd take out his stress by screaming at his subordinates and treating us like incompetent children.

Oh, and during my employment there, I began my gender transition. While my co-workers and my boss were totally accepting, our landlord wasn't, and they began illegally discriminating against me. My company just rolled over for them and refused to lift a finger to help me. That was when I really started to sour on the company, but it took eight months for me to actually bring myself to leave. I wound up fighting the landlord myself and filed a discrimination complaint with the city. Everyone with the city I dealt with was nothing short of excellent to me, much better than my employer. At one informal mediation session, I brought in the owner/CEO, and in his bumbling ignorance, he almost sabotaged my case. Finally, the landlord backed off, and I won, but I will never forget how poorly I was treated by my own employer. What's funny is that I was told by the city that if my employer had been over the 15-employee threshold, I could've filed both a municipal discrimination complaint and a federal EEO violation against them for rolling over for the landlord.

Still, I stuck with the company for a few reasons. One, I still felt like I owed them something after how they rescued me from long-term unemployment. Two, their treatment of me shattered my self-confidence, and now I was afraid to put myself out there (doubly so since I'd never gone job hunting as a woman before). Three, as bad as this place was, it was the devil I knew; my next employer could easily be worse. Four, my immediate co-workers were wonderful people, and I didn't want to leave them behind (when I finally left, I friended some of them on Facebook, and we still keep in touch).

The final straw was when my boss spent several minutes shouting at me for something that was his fault and then spent the next week screwing with my desk arrangements before finally putting me on a PIP. I started searching for new jobs that day. Soon, one of the jobs I applied to that day got back to me with a programming test, then a phone interview, then a real interview. Within a month, I received a formal offer from them, and I put my notice in the day before the PIP was to expire.

I like my new employer much better. I was right to apply for this job, and I'm never working for a startup again.

Getting out felt like leaving an abusive relationship. I've talked to spousal abuse survivors, and their stories about how their exes treated them and how difficult it was to get out remind me of what I went through with that company.