You don't need command substitutions to set your variables:
var1="database1="
var2="database2="
var3="database3="
I think you need single quotes to add newlines, but it looks quite ugly if you quote your variables with double quotes. The double quotes are needed if your variables contain space characters:
sed -i '/#variables/i\
'"$var1"'\
'"$var2"'\
'"$var3" /data1/create_database
With GNU sed you could simply add a few newlines:
sed -i "/#variables/i$var1\
$var2\
$var3" /data1/create_database