Yes, man, you can prejudice all your domain doing bad things with a subdomain. But in manual actions Google tries to recognize if the subdomain belongs from the site owner and in some cases the penalty can affect only subdomains. Of course in web 2.0 blogs main domains are never affected.
Check what John Mueller said in how they handle would handle this type of situation where spam was involved in a single subdomain and its potential impact on the rest of the site:
"We generally try to recognize separate sites when they are on subdomains, even when they are on subdirectories that treat them as separate sites, however, we also try to recognize when one website essentially uses subdomains as a way of kind of organizing its structure.
If there are manual actions, we will try and keep them as specific as possible, and try and focus on that specific part of your website. If we can’t focus it though, then it’s definitely possible that it could spread out and we can say well everything on this domain, or a lot of stuff on this domain is kind of spammy, we need to take a little bit broader action. And that’s something where you probably want to watch out that your website doesn’t run into a manual action anyway, but if you are using subdomains and you are using subdirectories, then this is something that can certainly have effect.
This is somewhat similar to malware, where if we recognize that on multiple subdomains you are serving malware, then our systems might say oh well the general pattern for this malware is actually everything on this domain. So that’s something to kind of watch out for.