In the js example in your question if (/[0-9]+' and [0-9]+\$price/... - that regexp is identical to the one you'd store in a variable for bash except that in bash we use ' (or ") as the delimiter and so can't use ' (or ") in the string as-is while js is using / as the delimiter and so, I suspect, you couldn't use / in the string as-is and so the js regexp isn't actually any more literal than the bash regexp, it just uses different delimiters and doesn't need to be stored in a variable.
If you don't want to use a variable in bash, you can always just write a function to do the comparison:
$ cat tst.sh
#!/usr/bin/env bash
cmpr() { [[ "$1" =~ $2 ]]; }
text='The pizza is 2'\'' and 100$price' # The pizza is 2' and 100$price
if cmpr "$text" '[0-9]+'\'' and [0-9]+\$price'; then
echo "this is what I prefer to have -- literal regex, like / /g in js. But this wont even compile"
fi
$ ./tst.sh
this is what I prefer to have -- literal regex, like / /g in js. But this wont even compile