Put the sweet potatoes and potatoes in a medium pot, cover them with water, and bring to a boil over high heat. Cook until they are just tender, 5 to 10 minutes, and drain well.
While the potatoes are cooking, whisk the eggs together in a large bowl. Add the sun-dried tomatoes, hot pepper, and basil. Season well with salt and pepper.
Generously spray a large, oven-proof skillet with cooking spray and put it over medium-high heat. Add the onions, mushrooms, and garlic, season with salt and pepper, and cook until the vegetables are soft and just beginning to brown, about 8 minutes. Scrape them into the egg mixture.
Spray the pan again with the cooking spray and add the drained sweet potatoes and potatoes in an even layer. Cook over medium-high heat until they start to brown, about 5 minutes. Add them to the eggs and mix well.
Spray the pan again and put it over low heat. Add the egg mixture and spread it out evenly. Cook until the bottom begins to set, about 5 minutes. Use a heatproof spatula to loosen the edge of the tortilla as it cooks on the stove top. Put the pan into the oven and cook until the top is puffed, set, and golden brown, about 8 to 10 minutes.
Remove the tortilla from the oven and let it rest for 5 minutes. Place a large plate upside down on top of the tortilla. Using a potholder, with e hand on the handle of the pan and the other on the bottom of the plate turn over the pan and plate so that the tortilla is now on the plate. Slice and serve.