Cut a pocket in each bread slice through the bottom crust, parallel to the cut surfaces. Do not cut through the top crust. Stuff each with half the cheese and a few onion slices.
Whisk together eggs, milk, salt, and pepper. Pour into a wide, shallow dish. Place stuffed bread into custard. Turn over after about 2 minutes, then let stand until most of the liquid is absorbed.
Heat oil over medium heat in a large skillet. Place half the apples in a single layer and cook 1 minute. Place the stuffed, soaked bread on the apples and cover with the remaining apple slices. Cook 1 minute.
Cover pan, reduce heat to medium-low, and cook 5 minutes. Uncover pan, increase heat back to medium, and cook until bottom is golden brown, about 2 minutes. Carefully turn bread over and cook until golden, 3-5 minutes.