There’s a lot of things, and still a lot of unknowns.
For one, your assumption that larger = longer isn’t true. So let’s throw size right out the window.
Telomere length and rate of decay varies between species, so that’s likely a factor.
Otherwise, relative lifespan likely has a lot to do with generics. There are lab animals where knocking out a single gene has vastly increased their lifespans.
Genes which contribute to an animals’ death have a lot of ways to spread through a population. A big one is called gene hitchiking. Vastly oversimplifying: let’s say I have a gene where I drop dead at 35; which we’ll call Instant Death. It’s on my chromosome right next to a gene that makes me super fertile compared to the rest of the population from 20 to 30; we’ll call it Ultra Babies.
Any of my offspring carrying Ultra Babies will outreproduce individuals without it, leading to it “going to fixation” within the population (ie becoming a common trait). At the same time, because they’re so close on the same chromosome, Ultra Babies and Instant Death are likely to be inherited together. Instant Death doesn’t kick in until the fertile period is over, too, so it’s not going to decrease the selective power of Ultra Babies; instead, it hitchhikes along to fixation riding on Ultra Babies’ coattails. Give it some time and luck and boom: you have a super fertile species that drops dead at 35.
Latest Answers