I don't know what your current gig is like, so it's hard to advise. But there's nothing wrong with taking this job with an eye toward moving on, as long as you work honestly at it while you're there.
My wife was in a similar spot when the company she was working for started to decline and experienced people started to move on. She stuck around and took a new position within the company in a different field she wanted to crack into. She was still very early career and saw an opportunity to get some good experience.
The company did tank, but she got at least a year and a half of experience, and later she got interviews/offers afterwards and built a network that is still active a decade later. She never would have been hired directly into one of those jobs in a new company, but she did get a chance at it in an existing company that wanted to keep her. She wasn't surprised that more senior people were leaving, because they had the background and network to generate comparable offers elsewhere, something she wouldn't have been able to do at that point in her career.
So much depends on your current situation, what kind of risks you're willing to take, what experience you think you'll get...