Legality isn't the issue here.
Many shared hosting plans are available with unlimited bandwidth/storage/domains. Whilst there's no such thing as truly unlimited anything, generally the better web hosts have set up their network infrastructure such that these limits are high enough to be practically unlimited in any real-world use case.
E.g. DreamHost's real quotas increase weekly, but currently for $8.95/month (though there's an MLJ Day special for $5.95/mo + 2 free domain registrations) you're guaranteed in excess of 500GB of web storage + 50GB of personal storage and 5TB/month of bandwidth.
Granted, there usually are stipulations to the "unlimited" diskspace and bandwidth. With DreamHost,
- you can't run a file sharing / backup / archiving / mirroring / distribution service;
- you can't do anything illegal like copyright infringement;
- you can't give the general public access to your account resources (e.g. post your login info on a forum and invite everyone to use it);
- use it for sites that are mainly designed to drive traffic to another website, i.e. affiliate websites and other spammy low/zero-value sites (one thing I really respect about DH over other webhosts like Godaddy);
But there's nothing there that says you can't resell web hosting to particular people. In fact, DreamHost even encourages it, and you don't need any kind of special account. With even their shared hosting plan, you can already create as many SFTP/shell accounts as you like, and you just manage those accounts yourself through your DH panel and bill your customers however you wish.
So what's the catch?
No shared hosting plan out there offers unlimited CPU time or RAM. All the shared hosting users on a server need to share the system resources. Additionally, a per-billing-account CPU and memory quota is usually placed on each subscriber (and all of their sites/ssh users) to prevent a single person hogging all the resources and disrupting service to everyone else.
Storage and bandwidth are relatively cheap for webhosts, so CPU/RAM is typically the bottleneck on shared hosting, and that's why unlimited storage and bandwidth is possible—most sites that grow organically to use .5TB+ of storage or 5TB+ of bandwidth are receiving so many requests per second that they'll slow to a crawl on shared hosting.
That's why operators of very successful sites end up upgrading to VPS/dedicated/cloud hosting. It's not because they need more storage or even necessarily more bandwidth. It's because their site/sites have outgrown the CPU/memory quota on shared hosting.
Now, a lot of people still do manage to host 10-20 or possibly even more sites on shared hosting as the majority of sites out there are very low traffic. So if you're a web designer/developer, it might be possible for you to host all your client websites if they only average 50-60 hits a day. But shared hosting still doesn't allow you to do a lot of things that a real web host ought be able to do.
You can't increase user quotas beyond what your shared hosting account has globally. You don't have root access to the server to install/change any software you want. And you certainly won't be able to run a cPanel-like system that modifies DNS entries, Apache configurations and other server settings to add/edit domains, edit cronjobs, create new SSH/SFTP users, create new MySQL databases, etc.
Looking at the particular shared hosting plan you linked to, I'm not even sure you have SSH access. So while DreamHost lets individual SSH users create their own cronjobs, compile their own PHP install with their own modules and settings, and do a lot of cool stuff on an SSH account, you might not even be able to provide these features to them manually.
So when it's all said and done, yes, it's legal
; but I certainly wouldn't let any of my friends/clients buy hosting from a host who's basically subletting his shared hosting account.