It might not seem like a big deal to swap out a different size cake pan for your recipe, but it could be the cause of your cake collapsing. If the cake pan is too small, the batter might be too deep and require a longer cooking time or may even overflow in the pan. Filling your cake pan to around halfway is generally ideal.