When we change the settings at a bash prompt, the new settings seem to be stored only in the memory of the running X Server.
To make the changes persistent, you may have luck uncommenting the "KEYBOARD_RATE" and "KEYBOARD_DELAY" lines in /etc/kbd/config if your system has that file.
Otherwise (for Ubuntu, anyway), there tend to be various distro-specific approaches, see: https://askubuntu.com/q/140255/231504
Here's why I'm guessing the values set via xset only live in-memory in the X Server:
When I run the command under strace, like so:
strace xset r rate 175 37
It seems (based on my limited experience with strace) that the settings are written to a socket, and on my machine the socket is:
/tmp/.X11-unix/X0
To see what's on the other end of that socket:
sudo lsof +d /tmp/.X11-unix
... which outputs:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
Xorg 1635 root 3u unix 0xffff88046ae4bc00 0t0 24945 /tmp/.X11-unix/X0 type=STREAM
...which shows that the process listening to the socket is Xorg (aka The X Server). Of course, the X Server could then hypothetically persist the values to non-volatile memory somewhere, but based on multiple anecdotes from users, it would seem that's not the case.