Heat oven to 400° F. In a large bowl, combine the cheeses, lemon juice, salt, pepper, and thyme and mix well. Working on a lightly floured surface, roll out the pastry to a 9-by-13-inch rectangle and place on a lightly greased baking sheet. Spread the ricotta mixture on top of the pastry, leaving a 1/2-inch border around the edges. Fold over the sides. Place the onions on top and drizzle with 1 tablespoon of the oil. Bake until the pastry is light golden brown, 25 to 30 minutes. Remove from the oven and drizzle with the remaining oil. Meanwhile, in a skillet over low heat, toast the pine nuts until fragrant and golden, about 5 minutes. Sprinkle half the nuts over the tart and reserve the remaining half for another use.