Yes, lots of sun and regular watering, can't skimp on that. I don't know about doing 4x4 but what about two rows (taking up about 3 feet wide) going the full seven feet along the outside of the balcony? Well I guess that would be closer to 4 feet wide and seven feet long.
I guess if you have at least 7 feet clearance overhead and get plenty of sun for most of the day, it could be done. Corn does suck up a lot of nutrients, so you would have to start with some nutrient rich soil and if it starts to stint add in more.
Experiments are fun, so if you think you have the minimum requirements to theoretically do it, go for it!