I'm not sure what you are trying to do with ESCAPED_WHATIF_POLLING_SCHEDULER=\"${WHATIF_POLLING_SCHEDULER}\"
.
Note that java -Dwhatif.polling.scheduler="0 * * ? * *" -jar "$MY_JAR"
does not really contain quotes in the value of the parameter. The quotes are part of the shell syntax.
The following commands are 100% identical from the viewpoint of the shell:
java "-Dwhatif.polling.scheduler=0 * * ? * *" -jar "$MY_JAR"
java -D"whatif.polling.scheduler"="0 * * ? * *" -jar "$MY_JAR"
java -D"whatif.polling.scheduler=0 * * ? * *" -jar "$MY_JAR"
java -Dwhatif.polling.scheduler=0" ""*"" ""*"" ""?"" ""*"" "*" -jar "$MY_JAR"
java -Dwhatif.polling.scheduler=0\ \*\ \*\ \?\ \*\ \* -jar "$MY_JAR"
java -Dwhatif.polling.scheduler='0 * * ? * *' -jar "$MY_JAR"
java -Dwhatif.polling."scheduler=0 * * ? * *" -jar "$MY_JAR"
So the command that you executed is equivalent to:
java -Dwhatif.polling.scheduler='"0 * * ? * *"' -jar "$MY_JAR"
You actually want to run:
WHATIF_POLLING_SCHEDULER='0 * * ? * *'
java -Dwhatif.polling.scheduler="$WHATIF_POLLING_SCHEDULER" -jar "$MY_JAR"
or maybe:
WHATIF_POLLING_SCHEDULER='0 * * ? * *'
CRON1="-Dwhatif.polling.scheduler=$WHATIF_POLLING_SCHEDULER"
java "$CRON1" -jar "$MY_JAR"
There's no need to embed quotes in your value, because the quotes are not actually part of the value.