Genuine question: How huge of a pull are the Dreamworks IPs? I ask because Madagascar and Kung Fu Panda are likely done as film series, and Dragons and Shrek likely won't be going for too much longer after Dragons 3 and Shrek 5. I know "relevancy" doesn't matter too much for attractions (just looking at how successful Avatar is), but I do wonder how big of a draw some of the Dreamworks franchises are. But I can easily be wrong, and Dreamworks is a greater pull than I realize. I'm just unsure.
Shrek 5 is probably going to be some kind of reboot attempt that relaunches the series. Unless it bombs, I don't think it's the last.
Let's say Shrek 5 pulls in $600m+ worldwide; that easily justifies making another trilogy or so.
As far as DreamWorks future goes, Boss Baby is getting a sequel. HTTYD may get more depending on how 3 does.
HTTYD 3 is probably going to feel like a trilogy ending, but if it does $600m+ worldwide , I'd be surprised if a 4th isn't announced.
Kung Fu Panda will probably get another new movie after Universal Beijing is finished. They might want to try a world premiere there of sorts.
Madagascar is a more tough situation given that Penguins did poorly, but a reboot or continuation might happen at some point. The main movies were all profitable.
Trolls 2 is coming because DW completely owns that toy brand with minor exceptions, so they probably are just hoping a better movie can actually do way better than the original's $340m. Anything around $500m+ would be a huge success and justify at least a 3rd. Owning the complete brand means movie refresh can be more profitable other ways.
Frankly, I'd expect Trolls to show up in theme parks more given that.
Basically, to better answer your question; the DreamWorks IPs should have a fairly long shelf-life, but in the current marketplace there's no guarantees in the movie business (look at the sequel fatigue affecting even highly rated movies like War for the Planet of the Apes among others; even DM3 with a decent rating faced a lot of sequel fatigue in the US).
They should be pretty well set to last through the 2020s though and launch a new park.