You can't actually achieve your stated aim in the way you are proceeding. You are reading in an image written by some other, unknown JPEG library and writing it out, possibly using a different quality value with the JPEG library that PIL uses under the covers. The JPEG standard allows image encoders/decoders to use varying levels of accuracy and to make varying tradeoffs between accuracy, image size and speed so it is unlikely that 2 JPEG encoders will come to the same result - even different versions of the same library may encode differently.
So, if you really want to change your meta-data without changing the image quality, you will be better off using a tool such as exiftool
which does not decode and re-encode your data. At the command line, you would use:
exiftool -Model='My Funky Camera' image.jpg
You can then see the new setting with:
exiftool image.jpg
ExifTool Version Number : 11.11
File Name : image.jpg
Directory : .
File Size : 105 kB
File Modification Date/Time : 2019:10:23 12:54:34+01:00
File Access Date/Time : 2019:10:23 12:54:35+01:00
File Inode Change Date/Time : 2019:10:23 12:54:34+01:00
File Permissions : rw-r--r--
File Type : JPEG
File Type Extension : jpg
MIME Type : image/jpeg
JFIF Version : 1.01
Exif Byte Order : Big-endian (Motorola, MM)
Camera Model Name : My Funky Camera <--- HERE IT IS
X Resolution : 1
Y Resolution : 1
Resolution Unit : None
...
...
Megapixels : 1.6
There is a Python binding, but personally I would just use a Python subprocess
with the regular, command-line tool. YMMV.