Think of yourself as a company of one
You should always think of yourself as a company of one. To make a profit, you should create more revenue than you spend. You can lose for a year or two if you are making a capital investment in your self such as through internships or education. Your education should focus on gaining skills to bring you revenue in the future, don't waste years on a mediocre degree.
You should evaluate your cost in terms of the time and pressure of your current job. If you put more time or get higher pressure than what the job gives, you are in a losing situation. If that losing situation doesn't build a future capital, such as effective on-the-job learning, you have to leave.