Yes, the example sentence is grammatically correct, even with "is is", and yes it has the meaning you reduce it to. The subject is, "What I think the purpose of life is". This is a noun phrase. The main verb is "is". The subject complement is "to live happily with our loved ones". Here's some more examples with video clips: >[The only thing there is is cognition][1] > >[What it is is the National Park Service is providing staff...][2] > >[And why that is is still a mystery][3] [1]: https://youtu.be/qc6ctN5-xX0?t=410 [2]: https://youtu.be/qM0uOAqrVb0?t=415 [3]: https://youtu.be/k9ikJ-cuKZ0?t=190