In a large Dutch oven or large heavy saucepan, melt butter over high heat. Add diced mushrooms and cook, stirring often, until mushrooms begin to get golden brown. Turn heat to medium high and add onion, garlic, leek and eggplant, stirring to combine. Add olive oil, stir and cook for about 5-6 minutes or until vegetables have softened. Add crushed or diced tomatoes, basil, bay leaves and red pepper flakes. Stir to combine well, cover and simmer on low for 1-2 hours, stirring occasionally. When sauce is done, add salt and pepper. Place spaghetti squash in a microwave safe dish with about ¼ cup of water. Cover and cook for 12-15 minutes or until squash has softened. Cut in half and scoop out seeds. Place squash in a bowl, fill with eggplant sauce and sprinkle with parmesan cheese.