I think it could happen, but you'll have to do almost everything diy. IMO, for an octopus tank, the hardest part of keeping to that budget will be the skimmer. Octo tanks require a very powerful and efficient skimmer. Here's how I would do it:
Get a second hand 55 gal, but preferably 75 because the extra width is extremely helpful with aquascaping. Make sure that you are getting it from the original owner and that copper has never been used (even the smallest amount is 100% deadly to an octo).
Build the stand yourself (if you're not woried about appearance, use cinder blocks and plywood.)
Get sand from HD or lowes for 5 bucks a bag (you have to be careful about what type you use, someone with experie
nce here will hopefully chime in on what type to use) and then get about 1 pound of live sand and mix it in.
For live rock, do some research about making it out of agrocrete, or use something like texas holy rock or similar, just do research to make sure it's ok to use in an aquarium. Get a few medium sized pieces of real live rock and spread them out through the dead rock in the tank.
---note: if you do it this way with the rock and sand, you'll end up having to spend quite a while (at the very least, 3 months, if not 5-6) to let it all get populated.
As for the skimmer, see how much you have left in terms of money, maybe get a good used one or do some research on how to make one. You are going to want a skimmer rated for 100-150 gallons for an octopus in a 55 or 75 gallon tank.
You may want to do powerheads or closed loop, I personally prefer closed loop because it takes up less room, and IMO is easier to work with. Powerheads would probably be better though on this budget.
set up a 30 or so gallon tank underneath the stand as a sump/refugium and just use simple plumbing for it all. (find a used, cheap overflow box, or dyi for 20 bucks, or of course you could go new for a ridiculously overpriced $70-$80. Also, make sure to use flexible hosing to bring it back to the tank)
If you're planning on trying to do a cheap set up for $400, you'll probably end up spending more like $500-$600 from the "low cost" set ups I've seen...
Hope this helps.