Let's look into each sentence:
Meats and vegetables are so expensive these days. We'd better eat out.
Grammatical structure: [Subject] + had better + [base verb].
I'd rather go swimming than playing tennis outside. I hate sweating.
The second sentence is correct: after "hate" we use a gerund. But if we talk about verbs used to talk about sports (link), we say go swimming (swim with -ing), but play tennis ("play" is a base verb in here).
That is why we should say: I'd rather go swimming than play tennis outside. I hate sweating.
We should not forget those who have given their lives in the defence of freedom.
"Who" is the appropriate pronoun (related to people). The structure have given is OK as we talk about past actions and results are noticeable in the present.
I gave him the invitation myself. He can't have forgotten about the wedding.
To give sth yourself is a grammatically correct structure. The second sentence is also fine because "cannot" means 0% probability and Present Perfect after this modal verb refers to the connection with past actions.
Since the accident, he sometimes doesn't speak clearly. The injury may have caused brain damage.
The second sentence is the replication of the rule discussed in the 4th example. We use Present Simple in the first sentence because of "sometimes" - word-linker.