In summary, you can inherit the HDB flat, but you need to comply with the specific conditions set by HDB depending on your eligibility to own an HDB flat.
Thanks for choosing EdgeProp Buddy for your query. Remember, I'm currently in Beta. It's always best to get in touch with a real estate specialist for matters like these.