Apple does not pre-announce end-of-support for iPad models or other devices. That said, history demonstrates that Apple may continue software and security updates for iPad for five to seven years from initial model release. Apple typically supports its products for far longer than other manufacturers.
Providing that your iPad can been kept up-to-date with system software updates, you should not be overly concerned for your iPad being directly compromised by malware. Due to the system architecture of iOS/iPadOS, unless jailbroken, your iPad is not susceptible to traditional malware infection per-se. However, as with all computer systems, there are still vulnerabilities and exploits to which you remain vulnerable.
For older devices, no longer benefiting from regular security updates, the risk of an unpatched vulnerability being exploited increases. Many banks and financial institutions require that computers are kept updated ff used to access your accounts - and may, for protection of your finances, apply technical measures to ensure compliance.
While you can continue to use unsupported devices, the risk of compromise increases. Your own risk appetite - and the technical requirements of sites and services with which you interact - will heavily influence how long an unsupported device retains usefulness or utility. This is true for any computer system - not just iPad.