Peel and cube eggplant, boil until soft. Drain water and mash. Add (sauteed) diced onion and garlic, breadcrumbs, beaten eggs, melted butter, pesto, and mix well. Grease a pie pan. Slice one tomato and layer on bottom of pan. Add eggplant mixture. Slice the other tomato and layer on top of eggplant mixture. Add grated Parmesan cheese and sprinkle with fresh basil. Bake at 350 F for 30 minutes or until golden brown.