Preheat oven to 400°F
Oil heavy large baking sheet. Toss onion wedges with oil in medium bowl. Season with salt and pepper. Arrange onions in single layer on baking sheet. Bake until bottoms of onions are golden and onions are very tender, about 25 minutes. Transfer sheet to rack; cool. (Can be made 1 day ahead . Cover and let stand at room temperature.).
Preheat oven to 400°F Roll out pastry on lightly floured surface to 14x11-inch rectangle. Trim edges to even. Cut 1/2-inch strip from each side of pastry, forming 13x10-inch rectangle; reserve strips.
Transfer pastry rectangle to another heavy large baking sheet. Brush edges with some of beaten egg; reserve remaining egg. Place strips on edges of tart, creating border. Trim strips; press gently to adhere. Pierce bottom of pastry several times with fork. Bake until edges puff and pastry is golden brown, about 15 minutes. Transfer baking sheet to rack. Using metal spatula, loosen pastry from baking sheet. Cool completely on sheet. Reduce oven temperature to 350°F.
Stir cheese, pesto, cream and 2 tablespoons basil in medium bowl until smooth. Season with salt and pepper. Mix in remaining beaten egg. Spread cheese mixture evenly over bottom of crust. Remove peel and stem end from roasted onions. Fan wedges, golden brown side up, over cheese mixture.
Bake tart until crust is brown and cheese appears set, about 20 minutes. Transfer baking sheet to rack and cool tart to room temperature.
Sprinkle tart with remaining 1 tablespoon basil. Cut into squares.