Using your iPhone to remove your iPad from your AppleID account prior to signing-out from the AppleID account on the iPad will only complicate matters.
You will need to factory restore your iPad - then setup the iPad from the initial "hello" page using your AppleID.
Restore your iPhone, iPad or iPod to factory settings – Apple Support
Turn on and set up iPad – Apple Support
You’ll need access to either a Windows PC (with iTunes for Windows installed) or a Mac (with iTunes or Finder - as appropriate for the installed version of macOS).
Download and use iTunes for Windows – Apple Support
Update to the latest version of iTunes – Apple Support
Use of a PC or Mac computer is unavoidable. If you don’t have access to a suitable computer of your own, that of a helpful friend or family member will suffice. Alternatively, the technicians at the Genius Bar of your local Apple Store or Apple Authorised Service Provider (AASP) will be delighted to assist.
Genius Bar Reservation and Apple Support Options - Apple
After your iPad has been setup afresh, should you still wish to fully sign-out, follow this process:
What to do before you sell, give away, or trade in your iPhone or iPad - Apple Support