Preheat oven to 375°F (190°C).
Heat a large cast iron skillet on the stove. Add 2 tablespoons canola oil. Pan fry cubed sweet potatoes for about 7 minutes until lightly browned. Remove from pan and set aside.
Add remaining tablespoon canola oil into the same pan. Fry onion and hams for about 5 minutes. Add green peppers and continue to cook for another 2 minutes.
Return the fried sweet potatoes to the pan. Add red pepper flakes, pepper, and cinnamon. Give it a good stir to get everything well mixed.
Sprinkle shredded cheese over sweet potatoes and ham. Place into preheated oven and bake for 10 minutes.
Remove and serve immediately.