Is the phrase "as I imagined would be the case" grammatically correct and why? [duplicate]

Yes, it is correct. No, it would not be preferable or “more grammatical” to use “what” or “the case” as well as as in this context.

Here is a previous question with information about how the grammar of this type of clause can be analyzed: Where is the subject in "as was traditional for unmarried women"?