Preheat the oven to 400ºF. Warm the oil in a medium ovenproof skillet over medium heat. Add the onion and bell pepper, season with salt and pepper and cook, stirring occasionally, until the vegetables are very tender, 6 to 8 minutes. Add the garlic; cook, stirring, until fragrant, about 1 minute. Add the ham; cook, stirring, until warmed through, about 1 minute.