I've been also struggling with the same sort of situation.

Initially I was working as the only developer at a small company. I spent a lot of time building better code and learning as much as I could. After about a year I noticed my forward momentum slowing and my overall happiness dropping. I felt I wasn't improving enough by myself.

I moved to another company with 5 other developers. I thought this company was going to be a great opportunity to improve my skills. However I quickly realized the company as a whole hired only mediocre developers with no will or skill to improve. I feel I provided a lot of value while at the company but as a whole I was extremely unhappy. The companies managers, if you can even call them that, had literally no experience. What they had in age they lacked in technical ability and skill.

I quickly moved to the my current company and I can say things have changed for the better. Although my company has hired some mediocre developers and cheap overseas labor we do have a fantastic CTO leading our technology department. I've been really able to improve my knowledge and skills considerably. I find I'm much happier and feel more accomplished.

What I've found to be most important for my happiness is company culture and leadership. Our culture is very open and playful. Although we joke a lot we work hard when it comes down to it. Our leadership is solid. It makes a world of difference coming from my previous employer who had 10x the money but lacked the leadership to do anything with it.

I still deal with the other mediocre developers and their poor attitudes but I've been able to look past them. Focusing on learning from our CTO as well as becoming the problem solver has has helped myself exponentially. Being the problem solver allows you to see the issues and work towards fixing them instead of allowing them to hinder your progress and growth.

To address some of your points:
1. How can I figure out why I can't enjoy any job that I take? This takes a lot of self reflection. I had to consider why I was at my current company and what was keeping me there to really find my own answer. I don't think anyone but yourself can answer this question for you. Spend some personal reflection time on this.

2. How can I tell if I am the problem? I would suggest looking at your behavior at work. Are you friendly? When someone needs help do you help them or turn them away? I don't think you're the problem but your unhappiness can exacerbate an existing problem.

3. How can I stop doing front end work? You're going to just to have to start doing back end work. It's clear your not going to be assigned any so just start doing back end work and start forcing opportunities for you to do the back end work. The worst they can say is no, but it's unlikely.

4. How can I identify a good team before accepting the job? I've struggled with this issue. The interview can be difficult to judge. I've been fooled multiple times into thinking the team I was joining was a strong development team. The number one question I would ask if given the chance was which framework was chosen and why it was chosen. If they don't have a good answer its a VERY CLEAR sign the development team is quite weak.

5. Is it bad that I'm moving through jobs so quickly? No. Double no. Triple no. You're happiness is important. If you're current job isn't providing the right environment for personal growth move on until you find the right company. In the last year I've had 3 jobs. You're going to find a lot of duds before you find a winner. In my experience it's been financially more rewarding to switch jobs. If you find you only reason for staying is fear, then leave. Don't let yourself be afraid of trying something new.

I would also create a GitHub account. Consider it your public code resume. You need to fill it with interesting projects. So start filling it with code. This has helped jump start my own personal growth.

Seth Godin has a book called Linch Pin which I highly suggest reading. It's just the right kind of motivation you need in your situation.

To sum it up: Keep working hard. Keep growing. Keeping learning. Never let anyone get in your way. Don't ever settle for mediocre and most importantly be happy and share the art you create with the world.