It's a change in emacs-27, from etc/NEWS:
** 'print-quoted' now defaults to t, so if you want to see
'(quote x)' instead of 'x you will have to bind it to nil where applicable.
So binding print-quoted to your desired value and then saving a
customization should be enough.
An interesting question. It's not configurable at all, so I recommend looking at pcomplete-insert-entry. This is where the completed text is inserted, and it's what calls comint-quote-filename. Note that it handles some fun edge cases that you'll also have to handle. In particular, if there's already a backslash in the buffer then it handles the insertion a ...