IANAL but I don't think it matters whether the purpose of collection is specifically to facilitate paid features. From the European Commission:
> The GDPR applies to:
[...]
> 2. a company established outside the EU and is offering goods/services (paid or for free) or is monitoring the behaviour of individuals in the EU.
Assuming account names or the content of comments constitute personal data within GDPR, I think YCombinator falls into this group.
Edit: I forgot HN collects an optional email address too, which is definitely personal data.
The GDPR applies to the data of people residing in the EU. The location and profitability of the organization collecting the data isn’t a factor. (Though it may introduce questions of enforcement.)