Peel and cube eggplant, boil until soft and tender, then drain water and mash. Add diced onion, garlic, breadcrumbs, egg, melted butter and pesto to the mash; mix well. Grease a pie pan. Slice one tomato and layer on bottom of pan. Add the eggplant mixture. Slice the remaining tomato and layer on top of eggplant mixture. Add shredded cheddar cheese and sprinkle with fresh parsley. Bake at 350°F for 30 minutes or until golden brown.