Work with 4 sheets of filo at a time, place one sheet of filo on a clean, flat surface (I used a parchment-lined baking sheet). Spray the filo with cooking spray or brush gently with olive oil. Arrange a second sheet on top and spray with cooking spray or brush gently with olive oil. Repeat 2 more times, creating a stack of 4 sheets. Divide the stack into 6 equal squares. Press the squares into the bottom and up the sides of a 12-cup muffin pan. Repeat with the remaining 4 sheets of filo, creating six more cups. You will now have 12 cups ready to fill.
Place an equal amount of the ham and onion into each cup. Set aside.
In a medium bowl, whisk together the eggs, milk, 1/2 teaspoon salt, and 1/4 teaspoon black pepper.
Spoon or pour the egg mixture over the ham and onion, distributing the mixture evenly. Top with the cheddar cheese.
Bake for 20 to 25 minutes, until the egg mixture is puffed up and set and the filo is golden brown.