Your question seems on-topic, so I'll try to go over concerns I'd have about it being on topic, but say why I think it is on topic.
with the text "Hello, world!" printed on it somewhere
This is somewhat vague, does printed mean it has to be "text" or can I make an image and use that? I'm not certain how effective workarounds like this would be, but they might cause the challenge to degenerate somewhat.
This may mean your challenge would be too broad for having too many possible answers, but should be on topic.
based on the size of the output PDF file itself
This is usually fine, and it is what the tag code-challenge is for. However, Peter's comment addresses a potential problem with the way this is structured. Say I post and answer. Then, SomeUser copies the result that I got, but uses their massive server farm to compress it slightly. Now their score is better than mine. While there isn't really anything inherently wrong with this, and we've had several on-topic largest prime finding questions that function very similarly, I'd be worried that the challenge would quickly devolve into just spending more time compressing the current best answer.
Entries must conform to the ISO 32000-1 PDF standard, and be viewable on commonly used PDF viewers
This is a bit of a pain, but requiring conforming to a standard would mean you need to include the standard in your post. Instead of this, I would recommend changing this so that it only has to work on one free PDF viewer that is freely available and older than the challenge. This is more in line with how we handle programming languages as being valid for a challenge. (It also would help with the above, where finding lazier PDF viewers might help lower your score)
This may cause what you are asking to be unclear, but so long as you fully clarify what is going on your post is about writing a program to solve a task with an objective winning criterion and an objective validity criterion.
Some of this answer kind of crosses over to things that should be done in the sandbox, the core of your question: "Is this on topic" is yes, but the goodness of a challenge should probably be limited to the sandbox.