I had a job like this. In a team of 3 people l and the two other ladies I worked with had gotten used to sitting playing solitaire all day, planning their home deco projects, and spending a LOT of time clucking and bitching about colleagues from other departments. Their whole attitude was negative about the company, figuring they were underpaid so why should they work any harder. They were my superiors and weren't that nice to me - if I suggested an improvement it got shot down, and any tasks that made their way to my desk were the crappest of crap.
The thing is I was in my 20s and had joined the company to build a career. The company was big, international and from the outside looked like it should have had loads of opportunities.
I played a long game of two years. I was quite silent, didn't join in any office gossip but also didn't ruffle any of these two mother hens feathers. Took on the few crappy tasks without complaints and quickly learned to not push for more work from them. But in all the free time i spent days and days reading up on any company material. Wherever it came from, I read it, learning everything there was to know about the company. I spoke to anybody I could outside of my small team and was super friendly and helpful. If anyone mentioned they needed help with something in passing I would casually offer to take a look "if I had time" (as long as I knew how to do it). I just learned everything I could.
Through one of my contacts in another team I found out about another role and interviewed for it. They were super impressed with my knowledge of the business and I got promoted two levels up in another department, ranking over the hens. They couldn't believe it - after all they had treated me like I was useless probably because they thought I was and never bothered to find out otherwise at risk of having to share the few interesting tasks they had.
They absolutely hate me today and go out of their way to make my job difficult if they can. But my current boss and team value me. I work very hard and I love my job.
A few months of quiet time at work are great and as a temp over summer it's perfect, what more could you want. Even some people are happy with this long term and find it a good way to manage a job and home life. But if you are not happy then be careful. You might be turning into one of the hens and it's not a good look.