The iPad. The iPhone 8 is underwhelming.
The iPad 10.5 lets you do mutitasking, feels thinner (because it's so large), has a better screen.
The iPad is better value for your money. It looks incredible and future-proof, whereas I struggle to see or even remember flagship features on the 8. The 8 is great, but it's a terrible iteration.
You already have the only good thing that I would love the iPhone 8 for : a water resistant phone.
The iPad has a headphone jack.
Your iPhone 7 is still so modern, whereas your iPad 2 must be starting to feel a little jaggy and slow dated. If you can mentally picture the process of all the animation and loading, and your device is still registering your touch input, it's time for a change.
But, as people have said, I'd keep my money altogether. You still have an iPad 2 that can do mostly everything iOS 11 has to offer, it's not like you're stuck with an Air or a Mini 2.
But if you really must, don't even give the 8 a second look, go for the 10.5. The iPhone X is the real new iPhone.