A warning is unavoidable, unless much lower level code is used.
The issue is that
babel-spanish, by default, wants to use small caps Roman numerals instead of lowercase ones like in English.
However the Latin Modern fonts, contrary to European Modern (the default for the T1 encoding) don't have a boldface small caps font. Thus
babel-spanish uses a trick: it fakes the font by using capital letters from the normal boldface font, but at a reduced size (the size corresponding to subscripts).
You have three strategies. The first two strategies require some code to add before
Substitute the Latin Modern nonexistent font with the corresponding one in European Modern.
Disadvantage: you need to do this for every font size you need. For the TOC, which is the real problem, just
10 is needed (or
10.95 with the
11pt option, or
12 for the
Since you know that the faked small caps Roman numerals will be used, avoid the checking business that just produce the annoying warnings.
%% lmodern has no boldface small caps and we know it
%% so we avoid all the warnings related to the faking business
Use uppercase Roman numerals.