I guess my first question would be: how much experience have you had wrenching? Have you done anything like this in the past? This is not an entry level rebuild. If it were mine, it would be a frame up rebuild, doable but not easy with a lot of hidden surprises that might involve unforeseen expenses. If you took your time and didn't cut corners you could end up with a reliable and good looking machine, but it will be a lot of work.
It looks to me like if you can get it for $500, the maintenance items(fluids, filters, tires, and brakes) will be about another $500. Assuming the seller has usable parts(a long shot) I would budget at least another $1000 for parts and special tools(sockets, pullers, etc.) to get the bike reliable and looking good. This assumes that the transmission, drive shaft and final drive don't need to be replaced. These are not inexpensive components and can quickly wreck your budget.
By this time you will have $2000 in this bike and a lot of your time. If you were to put your time into more searching you can find a bike for less than $2000 that is in much better condition and ready to ride. This is a good time to be shopping, the season is ending and many sellers are getting anxious about selling their bikes and willing to accept offers.