In a large skillet, heat oil over medium heat. Add onions, and cook for 5 minutes, stirring occasionally. Stir in sugar and salt; cool, stirring frequently, until onions are softened and rich golden brown, 10-15 minutes; reduce heat if browning too quickly.
Place flatbread on a baking sheet; spread with caramelized onions, top with pear, walnuts and cheese and sprinkle with pepper.
Bake in a 400F oven for 10-13 minutes or until cheese is bubbly. Let stand for 4 minutes before cutting. Top with parsley, if desired.