Apple does offer repair of its devices.
For qualifying models of iPad, in lieu of repairing and returning your own device, Apple generally offer an exchange for a renewed/reconditioned iPad of the same model and specification. The cost of the exchange is exactly the same as the cost of a repair - so, for practical purposes, the benefit to you is rapid exchange instead of waiting many weeks for your broken iPad to sent away, repaired and eventually returned.
Apple offers fixed-price repairs, principally for two levels of service - battery replacement and “other” repairs. If you have benefit of an active AppleCare+ plan, this being optional extended service coverage, the cost is reduced to a small excess/deductible fee.
Be aware that Apple does not supply OEM parts to third-party repairers. As such, if you have your iPad repaired by anyone other than Apple, or an Apple Authorised Service Provider (AASP), any components used will not be genuine parts; this has implications for both the efficacy of the repair - and future hardware support from Apple. Many components must be calibrated when fitted - requiring software that it only available to Apple’s own technicians. Similarly, Apple’s diagnostic testing will detect non-OEM components.
As described, your third-party repair has used a screen that does not incorporate the specific screen hardware that interacts with the Apple Pencil - or the repair itself is at fault. You only available recourse is to return to whoever previously attempted to repair your iPad. Apple, or its AASPs, will not attempt to repair a device that has had an unauthorised repair.
For information, Apple’s own repair services are easily accessed via the Genius Bar at any Apple Store or Apple Authorised Service Provider (AASP):
Genius Bar Reservation and Apple Support Options - Apple
Apple also offers a mail-in repair service:
iPad Repair & Service - Apple Support