Okay, so the Apple Pencil is believed to be good. So, standard diagnostic steps are required - restart, reset, restore.
Assuming you followed the forced-restart without improvement, you’ll need to reset your iPad. First, ensure you have a current iCloud or iTunes backup - then:
Settings > General > Reset All Settings
The reset should not delete any data - but may resolve the problem. If still no improvement, you should fully reset the iPad:
Settings > General > Erase All Content & Settings
After the reset, you have the option of restoring your data from backup. For expediency of testing, I recommend that you defer restoring your data until you have established that your Pencil is working normally.
If the problem remains unresolved, you’ll need to restore the iPad to factory settings. This process will both erase/reset the iPad and install a fresh copy of iPadOS. Again, you’ll have the option of restoring your data - but again, it is recommended that you first confirm normal operation prior to restoring your data from backup.