The PDE-based inpainting algorithm does not require a lot of context to work, which means you can indeed extract the image area corresponding to the region you want to inpaint, surrounded by a bit of known pixels, then apply the inpainting algorithm on this region, and paste the result back to the original image.
In you case, something like:
gmic a.jpg 100%,100% polygon[-1] 5,345,4095,475,3976,700,4044,901,3875,1495,4095,1,255,255,255 +z 330,3800,1300,100% inpaint_pde[2] [3] j[0] [2],330,3800 k[0]
should work.