The 5 million record limit is a Data Loader memory limit, not a Salesforce limit, and I'm pretty sure that's more of a "suggested maximum per file" than a hard limit. The maximum records you can theoretically load in 24 hours is 200 times your API Limit (found in Setup > Company Information). This value is scaled depending on the number of licenses and type of org you have. For example, in a Developer Edition, your theoretical limit would be 3,000,000 records per day (but because of storage limits, is actually just 2,500 records total).
You would need about 135,000 API calls to load 27 million records, which would require you to have about 35 Enterprise Edition licenses or 7 Unlimited Edition licenses (or some other combination), assuming you had no other API traffic that day. Actual API usage may depend on how many triggers/workflow/processes/flows/validation rules/etc you have on the object, as you may get timeout errors with a batch size of 200. Presumably, if your org is large enough to have the storage for 27 million records, you probably have more than enough API calls to load all this data within a 24 hour window.