What is the callback sent to add_submenu_page() invoked by WordPress?

It must be pretty late in the action order because I’ve tried hooking
to admin_notices from it and it doesn’t work.

$function callback (param of add_submenu_page) is used to output the content of admin pages, so it runs when WordPress is actually displaying the markup (body) of page.

That should be pretty clear because you use echo inside that callback.

In the Actions Run During an Admin Page Request you linked, it is just before "in_admin_footer".

admin_notices” is also fired when WordPress output the content of admin pages, but just earlier (output of admin notices is on top of admin pages body).

If you need to conditionally output an admin notice, put a condition on “admin_notices” callback.

tech