Battery swelling, should it occur, will displace the screen from the iPad chassis/casing; it will not cause the iPad to "bend".
Bending, such as you illustrate, is most often associated with an iPad being left on soft furnishings - or amongst bedding - and is then unseen before being accidentally sat-upon.
As for your Pencil, the damage sustained by your iPad is localised to the Pencil's magnetic/inductive charging port.
For practical purposes, in lieu of repairing and returning your own iPad, Apple usually exchange the iPad for a renewed/refurbished iPad of the same model and specification. The cost of the exchange is the same as would otherwise be charged for repair. Unless you have benefit of an active AppleCare plan, an out-of-warranty repair while expensive will be somewhat less than the cost of a replacement iPad.
As for out-of-warranty repair costs, Apple offers a fixed-price price repair. You can verify eligibility and cost for your region/country here:
iPad Repair & Service - Apple Support
If you have an active AppleCare+ plan, the cost of repair is reduced to a small excess/deductible fee.