You should quote it properly with double-quotes. Using single quotes would not allow variables to be expanded and remain as literal form.
for (( i=12; i<=823; i++ ))
do
djvused file.djvu -e "select $i; set-page-title $((i-10)); save"
done
As noted about single quotes:
Enclosing characters in single quotes (‘'’) preserves the literal value of each character within the quotes. A single quote may not occur between single quotes, even when preceded by a backslash.
Whereas on double quotes:
Enclosing characters in double quotes (‘"’) preserves the literal value of all characters within the quotes, with the exception of ‘$’, ‘
’, ‘\’, and, when history expansion is enabled, ‘!’. The characters ‘$’ and ‘
’ retain their special meaning within double quotes