As described, your iPad battery has reached the end of its usable life. If the battery has failed or is failing, the iPad may unexpectedly turn-off - or may not successfully boot to a running state even when connected to its Power Adapter.
Are you able to use the iPad while remaining connected to your Power Adapter? If yes, while monitoring the indicated battery state, disconnect the Power Adapter; if the indicated battery state suddenly falls, or the iPad shuts-off, this test demonstrates the iPad battery having reached the end of its usable life:
iPad Repair & Service - Apple Support
Given its age, battery replacement is unlikely to available for your iPad mini2.
iOS
The first generation iPad Air, iPad mini2 and mini3 can only be updated to iOS 12.5.7.
Apple ended major update support for these models of iPad in September 2019 - although they have since received occasional “point” security updates, the most recent being released January 2023. These devices cannot be updated to iPadOS 13 (or any later major versions of iPadOS) as the internal hardware does not meet the minimum technical requirements (CPU capabilities and available RAM) for newer versions of iOS/iPadOS.
Whilst many App titles remain compatible with your iPad, if you want or need to access to Apps requiring a more recent versions of iOS than your iPad can support, you’ll need to consider replacement of your iPad with a much newer or current model. When replacing an iPad, you might be unwise to consider any model that cannot be updated to at least the current version of iPadOS - at time writing, this being iPadOS 17.5.1. Also consider that iPadOS 18 will be released later this year.
For information, here is a list of the highest version of iOS supported by the older models of iPad (for simplicity - “generations” are shortened to a number) that are restricted in their ability to be updated:
32-bit devices (obsolete)
iPad1 - iOS 5.1.1
iPad2, iPad3 and iPad mini1 - iOS 9.3.5 (WiFi Only models), iOS 9.3.6 (WiFi & Cellular)
iPad4 - iOS 10.3.3 (WiFi Only), iOS 10.3.4 (WiFi & Cellular)
64-bit devices
iPad Air1*, iPad mini2 and iPad mini3* - iOS 12.5.7
iPad Air2, iPad mini4 - iPadOS 15.8.2
iPad5, iPad Pro (9.7"/12.9" first generation) - iPadOS 16.7.8
(*) obsolete
Newer models are all able to be updated to the current version - iPadOS 17.5.1
- iPad Pro 13" (M4)
- iPad Pro 12.9" (2nd generation and later)
- iPad Pro 11" (1st generation and later + M4)
- iPad Pro 10.5"
- iPad Air (3rd generation and later + M2)
- iPad (6th generation and later)
- iPad mini (5th generation and later)
Current models of iPad all run iPadOS - this being considerably more advanced than earlier versions of iOS. Many App Developers only support the current plus previous one or two major versions - and will withdraw or cease support for earlier App versions.
As such, clinging to an older device that cannot run recent versions of iPadOS will severely limit the availability of usable Apps - as both Apps themselves and the services upon which they rely may cease to be supported or available.
Apple generally provides system software updates for between five and seven years from initial release of a device. Your iPad mini2 was initially released with iOS7 in 2013; major system software updates for this iPad ceased with iOS12 in 2019 - however point security point updates, addressing specific security issues, continued until early 2023.
In summary, your iPad mini2 has reached the end of both its technical and service life. It's time for its retirement 🙂