The answer is it depends on your individual financial circumstances. If your internal organs are about to be called-in by loan sharks, then obviously you have to take the job. But if you have rich parents, or some money saved, a cushy part-time job, or have found a way to survive by eating everyday household objects, then it's better to wait.
Plenty of great teams started in not-so-good agencies. The key is what you do when you get there. You don't settle. You don't sit on your arse. You spend all your spare time working on the one good account they do have. And the rest of your time working on your spec book. When my partner and I were at a rubbish agency, we spent every night working on our book. Not once a week. Every night.
There will be lots of nice people there, and probably quite a few good creatives too. Don't get suckered in by that. Keep focused on getting out. Because the vast majority of great work, is done by the great agencies. And sooner or later, you want to get into one of those.
Tuesday Tip No.1