On top of David's answer, wanted to provide some information around your question:
I'm working on a sandbox-refresh script and trying to determine how to handle custom settings that are in the sandbox but not in production.
With any refresh as David has highlighted, you necessarily get a replica of Production for metadata (and data if it's a partial or full copy sandbox) configurations. This would mean that you will lose all your changes in the Sandbox which are not yet migrated to Production.
For your scenario, you will need to make sure that your Custom Settings are stored as metadata say in source repository. Because you will only be able to store the metadata, you will also need to ensure that the data contained in Custom Settings are also preserved.
Then once you have refreshed your Sandbox from Production, you can then write the script to migrate those Custom Setting and the related data in your new Sandbox.