Preheat the oven to 400F; lightly brush the inside of a 1.5-quart casserole dish with oil.
Add the oil to a medium saucepan over medium-low heat; once hot, add the cabbage and onion and cook (covered) until the vegetables are softened but not browned, about 8 minutes, stirring occasionally.
Add the garlic and cook 1 minute more, stirring constantly.
Whisk in the vegetable stock, cream cheese, salt, pepper, and half of the cheddar shreds, stirring until smooth.
Pour the mixture into the prepared casserole dish and top with the remaining half of the cheddar shreds.
Cover the dish and bake until the casserole is bubbling throughout, about 20 to 25 minutes.
Serve warm.