For the pasta frolla, combine the dry ingredients and mix well. Rub in the butter until it is absorbed, making sure the mixture remains cool and powdery and does not become pasty. Beat the egg and stir it in with a fork. Continue stirring until the dough holds together, then knead it briefly, just until smooth. Shape into a disk, wrap in plastic, and refrigerate at least 1 hour, or until firm.
For the filling, bring about 4 quarts of water to a boil and add the rice, salt, and butter. Stir to make sure the rice does not stick to the bottom of the pan, and return to a boil over high heat. Lower the heat and boil about 20 minutes, until the rice grains are split open and overcooked. Drain the rice well. Combine the rice, sugar, and milk in a heavy nonreactive saucepan and bring to a boil. Lower the heat and simmer gently, stirring often, until the mixture is very thick and creamy, about 20 minutes. Remove from the heat and cool briefly. Press the ricotta through a fine sieve or strainer or puree it in a food processor fitted with the metal blade. Beat it into the rice mixture. Beat in the remaining ingredients, one at a time.
To assemble the torta, on a floured surface roll the dough out into a large disk, about 13 inches in diameter. Fit it into a buttered layer cake pan 9 inches in diameter and 2 inches deep. Press the dough well against the bottom and sides of the pan and trim the edges of the dough so they are even with the top of the pan. Pour in the filling and spread it evenly. The filling will be about ½ inch lower than the top of the pan. Fold the excess dough at the rim inward, over the filling, so that it forms a border about ½ inch wide at the edge.
Bake the torta in the lower third of a preheated 350-degree oven for about 45 minutes, until the filling is set and the dough is a light golden color. Cool the torta in the pan on a rack. When the torta is completely cooled, place a flat plate or pan on the torta and invert. Lift off the baking pan and replace it with a platter. Invert again and remove the top plate or pan. Keep the torta loosely covered at room temperature.