So in v2 and 3 .badge meant the more rounded version, and .label was the squarer one.
In the v4 alpha and v4 .badge-pill was used for rounded ones, and .badge was what was previously called .label

v4 has some extra color-variations, v2 let you use just .badge or .label on it's own to get the default and the red one changed from .badge-error to .badge-danger in version 3 too.

I think there's too much overlap to get perfect compatability, but I think just using the latest badge code for everything that was previously .label or .badge makes sense.

.label has issues as it is used elsewhere in Moodle code, so if that could be avoided having styles on it directly that would be good.

Finally, it would be good to wrap these compatability layers in variables so that people can opt-in or out of them e.g. @if $enabled-bs2-compat { (on the assumption that core code will phase this stuff out, a task that having a simple switch helps the testing of, but that then later some sites may want to continue with the backwards compatability for their content)