If I invest in any sort of hedge/mutual/index fund when the fund performance is up/down, for ex. +/-20%, and I invest $100k the next day - do I share the 20% loss or gain automatically in a pooled investment fund?
The short answer is no. For mutual funds and ETFs (index funds are generally either mutual funds or ETFs), the price has changed (up/down 20%) and is a gain or loss for the people who owned the fund during the change. You would buy at the new higher or lower price (up/down 20%) the next day and would feel only the gains and losses from that time until you sell.
For hedge funds the above is mostly true. First, note, you have to be a qualified investor to invest in such funds and they often can only be invested only on a monthly or quarterly basis. There is some evidence that some hedge funds don't completely update their marks and that you may share (slightly) in the previous month's gains and losses depending on the fund.
Edit for below question:
Index funds are almost always built over investments where the price is updated regularly sometimes down to the millisecond so when you enter the index fund you get an up to date price for everything in the fund including all the previous gains/losses. However, some hedge funds invest in illiquid securities don't get bought and sold often so the value of what is held is not well known. Sometimes the hedge funds make an educated guesses sometimes they just use an old price from the last time anyone bought/sold it. You can do some complicated calculations and show that for some hedge funds previous gains/losses are likely not fully incorporated in the monthly pricing. The effect is generally small though and is dwarfed by considerations such as fees and returns.