Safe (and restricted) version of eval
The way you implemented escaping some symbols, running eval, and finally restoring the escaped symbols, looks fine.

Have you escaped everything to make this safe?
That's hard to tell.
And will it be future-proof?
Now that's impossible to tell.
You just cannot know if a future version of Bash will introduce something that should be escaped and leave your script vulnerable until patched.
That's unlikely for sure, but this is an ugliness that any blacklisting approach cannot escape.

Most importantly, do you really need this? (As @200_success pointed out in a comment.)
It seems you don't.
If you need to parse key=value pairs from a config file,
then I suggest to do just that,
implement just enough parsing that you need.
The solution will be specialized for the specific use case,
but that will make it safe, and free of any present or future problems with eval.