Ok, I think something went wrong with migration, because with a fresh installation the problem doesn't happen.
However, I've discovered another odd thing: the problem happens only with new books added.
If I convert from epub to pdf a book I've already add in my library, it is correctly converted with the right format A4.
If I add a new epub and convert it to pdf, the page sizes are unexplainably forced to 215.9 x 279.4 mm.