An iPad 2 can only be upgraded to iOS 9.3.5.
There is no way to upgrade ANY hardware in an iOS device.
All the computing components are self contained and soldered to the main logic board.
This is a 7-year old iPad, as of this March, and is really underpowered and will not even handle the barebones features it would get from a later iOS.
The iPad 2 has an underclocked 1 Ghz CPU (dynamically clock between 800 Mhz and 1.0 Ghz) and only a paltry 512 MBs of RAM!
IF that iPad could run a later iOS, like iOS 10, you would not be very happy with its performance, at all!
The iPad 2 had nearly 5 years of iOS upgrades/updates.
FYI,
Technically, every single year a product manufacturer puts out a new product, the previous years’ products are obsolete to some extent!
So, what is your point?
Other mobile device manufactures support their mobile devices for a lot shorter time than Apple.
Apple supports their mobile devices for four to five years.
With other devices manufacturers, you are lucky to get three years of support!
I have an iPad 2 and it is working pretty well on iOS 9.3.5 with the exception of a 2 to 2-1/2 minute boot up time, but once it’s up and running, my iPad 2 is fine.
In addition, your iPad 2 should still be get some regular,,daily app updates under iOS 9.3.5 as my iPad 2 almost every day is getting groups of app updates!
Also, with any other operating system and device, you leave Apple’s security and walled garden ecosystem for a half baked Android OS riddled with thousands of REAL, ACTUAL viruses AND very bad malware such as this recent piece of work.
http://macdailynews.com/2018/03/02/new-android-malware-records-ambient-audio-fir es-off-premium-rate-texts-and-harvests-f…
So, this is your choice to make.
New, refurbished or used iPad or switch to another brand with a very “open”, but very unsecure operating system.
Good Luck to You!