After many attempts and much searching I have a working answer. First, you have to have the two brews installed on your M1 Mac- homebrew under arm and homebrew (ibrew) under emulated x86. See https://soffes.blog/homebrew-on-apple-silicon for this. Then, I was able to install mysql@5.7 under emulation, as well as openssl. This is needed because mysql2 is compiling under emulation, it seems, and is referencing those libraries.
ibrew install mysql@5.7
ibrew install openssl
I then needed to add mysql and its libraries to my PATH.
export PATH="/opt/homebrew/bin:/usr/local/bin:/opt/homebrew/opt/mysql:/opt/homebrew/opt/mysql/lib:/usr/local/Cellar//mysql@5.7//5.7.34:/usr/local/Cellar//mysql@5.7//5.7.34/lib:/usr/local/Cellar//mysql@5.7//5.7.34/bin:$PATH"
You might need to tweak this based on version numbers - and when you have it working put it in your ~/.zshrc or other shell initializer file.
Then I was able to install the mysql2 gem with these flags:
gem install mysql2 -V -- --with-ldflags=-L/usr/local/opt/openssl/lib --with-cppflags=-I/usr/local/opt/openssl/include --with-opt-dir="$(ibrew --prefix openssl)"
I'm not a C coder so I don't totally get the details of how mysql2 is linking up to the mysql libraries. I would prefer to use the available mysql under ARM, expecting it must run faster, but not sure how to get it to link up.