In the meantime, I was able to resolve this. So just in case someone else comes across this problem…
I have learned that BBEdit is not to blame here. It seems other applications registered various file types (.sh, .php), and when I uninstalled these applications, these files became generic “text documents” in the Finder.
To resolve this issue, I changed the “Always open with” application to something else (e.g. Visual Studio Code for .yaml). This fixed the Finder’s kind information. I then changed the “Always open with” application to BBEdit, and the “kind” information stayed correct/intact.