On a lightly floured work surface, roll out dough to 1/4 inch thick. Press dough onto bottom and up sides of an 8-by-11- inch rectangular tart pan with a removable bottom; trim dough flush with top edge of pan. Prick bottom all over with a fork. Transfer to a large rimmed baking sheet. Freeze until firm, about 30 minutes. Preheat oven to 400 degrees.
Line tart shell with parchment paper, and fill with pie weights or dried beans. Bake until dough starts to feel firm on edges, about 20 minutes. Remove parchment and weights; continue baking until crust is pale golden brown, about 10 minutes. Let cool completely on a wire rack. Leave oven on.
Heat oil in a large heavy-bottom skillet over low heat until hot but not smoking. Cook onions, stirring frequently, until golden brown, about 30 minutes. Let cool.
Whisk eggs, milk, cream, and salt in a medium bowl; season with pepper. Crumble in cheese, and stir in caramelized onions. Pour mixture into tart shell; bake until puffed and pale golden brown, 30 to 35 minutes. Let cool at least 30 minutes before serving.