Are there any situations where you can only memorize rather than understand?
I think one learns, then memorizes. I believe memorization before learning is like trying to jump up while sitting flat on the ground. It typically fails and is, at best, awkward. I think this issue is confusing only because many people mix memorization and learning. They learn only so much, then attempt to memorize vastly more than they learned.
I think this comes up a lot in trigonometry. It's easy to remember $\cos^2(x)+\sin^2(x)=1$ because it's a consequence of Pythagorean theorem. Once you learn that, it becomes almost immediately memorized. However, many students stop here. They do not realize that two other identities are simply transformations of this equation and applications of definitions of trigonometric functions. Without learning this knowledge, they simply attempt to memorize these two other identities. That is what I mean when I say that students only learn so much before attempting to memorize more than they learned. That, I think, is why trigonometry is very difficult for many people.
A case where I find that memorization does not immediately follow after learning is derivatives. It is not very straightforward to derive many basic derivatives (note that I mean you could not derive it on a Post-It note). This is where it is best to learn the definition of a derivative, derive the derivatives yourself, and then employ the derivatives in different equations and situations over and over until they are memorized. It is cases like this where I believe it becomes necessary to memorize. But, you are still learning before memorization.
Note that when I say "derive the derivatives yourself", I mean start with the definition of a derivative and solve the limit (rigorously).