WordPress 404 on Subdomain

You don’t appear to have allowed .htaccess overrides in the <VirtualHost *:443> container, so .htaccess is effectively disabled. Without .htaccess you’ll naturally get 404s for anything other than the homepage if you are using “pretty” permalinks. (.htaccess is not required for requests to the homepage, since index.php is served by mod_dir which is no doubt configured elsewhere in the main server config.)

You need something like this inside the <VirtualHost *:443> container:

<Directory /var/www/subdomain>
    Require all granted

    # Enable .htaccess overrides
    AllowOverride All
</Directory>

You don’t appear to be allowing access (ie. Require all granted) in the config you’ve posted so you are presumably handling this outside of the vHost? But make sure you are not enabling access to too much.