As described, symptoms suggest a failure of the Pencil.
Whilst troubleshooting pairing issues, perhaps concentrate on a single iPad. Some of this information may already be known to you - and some may be new or offer helpful clarification:
Use Apple Pencil with your iPad or iPad Pro - Apple Support
Charge your Apple Pencil and check the battery - Apple Support
This troubleshooting guide is recommended for diagnosing and resolving issues with Apple Pencil:
https://appletoolbox.com/apple-pencil-not-working-heres-our-troubleshooting-guide/
The tiny internal battery is particularly susceptible to damage if allowed to fully discharge, or be left unused for an extended period. To protect the Pencil battery from premature failure, a second generation Pencil should always remain docked with the iPad when unused.
If you remain unable to resolve the problem, you may need to replace your Pencil with new. If within your one year warranty, Apple will normally exchange a dead pencil without quibble.